Motion determining apparatus and storage medium having motion determining program stored thereon

ABSTRACT

Acceleration data which is output from an acceleration sensor is obtained. A rotation motion of an input device around a predetermined direction as a rotation axis is determined by comparing a start point in a two-dimensional coordinate system which is represented by the first acceleration data obtained in a predetermined period, and an end point in the two-dimensional coordinate system which is represented by the last acceleration data obtained in the predetermined period. Coordinate axes of the two-dimensional coordinate system are defined based on components of the two axial directions of the acceleration data, and an origin of the two-dimensional coordinate system represents a value of the acceleration data in the state where no acceleration including the acceleration of gravity acts upon the acceleration sensor. Motion data including at least the determined rotation motion is output.

CROSS REFERENCE OF RELATED APPLICATION

The disclosure of Japanese Patent Application No. 2006-066450 isincorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a motion determining apparatus and astorage medium having a motion determining program stored thereon, andmore particularly to a motion determining apparatus for determining arotation motion given to an input device including an accelerationsensor and a storage medium having a motion determining program fordetermining the same stored thereon.

2. Description of the Background Art

Conventionally, apparatuses have been developed for determining a motionof an input device operated by a user. The input device includes anacceleration sensor, and the motion of the input device is determinedusing an output from the acceleration sensor. For example, JapaneseLaid-Open Patent Publication No. 2002-153673 (hereinafter, referred toas “patent document 1”) discloses a game apparatus including a gamecontroller which is formed like a boxing glove and has a triaxialacceleration sensor. With the game apparatus, a user can enjoy a gameusing an output from the triaxial acceleration sensor.

The controller (glove) disclosed by patent document 1 includes atriaxial acceleration sensor having a sensor X, a sensor Y and a sensorZ. When a drastically large value is input to the sensor Y, the gameapparatus traces back an output waveform obtained from the sensor Y andsets a time around value 0 as time t0. A time at which value 0 or thevicinity thereof is obtained after the output waveform shows adrastically small value is set as time t1. An acceleration detectedbetween time t0 and time t1 is extracted from an output waveform fromeach of the sensors X and Z. Using the output waveform of eachcomponent, the game apparatus determines the type of the punch (forexample, straight, hook, uppercut, etc.). Specifically, in the casewhere the output waveform from the sensor X shows a slightly positivevalue and the output waveform from the sensor Z does not change, thegame apparatus determines that the player has given a straight punch. Inthe case where the output waveform from the sensor X shows a negativevalue at the start of operation and then shows a positive value and thewaveform from the sensor Z does not change, the game apparatusdetermines that the player has given a hook. In the case where thewaveform from the sensor X is infinite and the waveform from the sensorZ shows a large negative value and then shows a positive value, the gameapparatus determines that the player has given an uppercut.

The game apparatus disclosed by patent document 1 determines the type ofthe punch in association with the waveform from each of the sensors Xand Z. The determination is made independently for the waveform of eachcomponent. Therefore, this game apparatus does not assume a case whereoutputs from the two sensors influence each other, for example, a casewhere the direction of the glove (controller) is changed during thedetection period. In the case where outputs from a plurality of sensorsneed to be combined to determine a motion, the motion cannot beaccurately determined merely by making a determination independently foreach sensor. For example, a motion of the glove being rotated (twisted)around a predetermined rotation axis cannot be determined. Also, acomposite motion including a plurality of motions, for example, a motionof the glove being rotated (twisted) while the player is giving a punch,cannot be determined. Namely, the motions which can be input to thecontroller by the player are limited to relatively simple ones.

SUMMARY OF THE INVENTION

Therefore, an object of the present invention is to provide a motiondetermining apparatus capable of determining a rotation motion given toan input device including an acceleration sensor, and a storage mediumhaving a motion determining program capable of the same stored thereon.

The present invention has the following features to attain the objectmentioned above. The reference numerals, step numbers and the like inparentheses in this section of the specification indicate thecorrespondence with the embodiment described later for easierunderstanding of the present invention, and do not limit the presentinvention in any way.

A first aspect of the present invention is directed to a motiondetermining apparatus (3) for determining a motion of an input device(7) including an acceleration sensor (701) for determining anacceleration in each of at least two axial directions (X- and Y-axisdirections). The motion determining apparatus comprises data obtainingmeans (S61, S64, S77 and S92 executed by the CPU 30; hereinafter onlythe step numbers will be indicated), rotation motion determination means(S101, S102), and output means (S102, S106). The data obtaining meansobtains acceleration data (Da) which is output from the accelerationsensor. The rotation motion determination means determines, throughprocessing operations, a rotation motion of the input device around apredetermined direction as a rotation axis (Z axis). The processingoperations include comparing a start point (Ps) in a two-dimensionalcoordinate system (X-Y coordinate system) which is represented by thefirst acceleration data obtained in a predetermined period, and an endpoint (Pe) in the two-dimensional coordinate system which is representedby the last acceleration data obtained in the predetermined period,wherein coordinate axes (X axis, Y axis) of the two-dimensionalcoordinate system are defined based on components of the two axialdirections of the acceleration data, and an origin of thetwo-dimensional coordinate system represents a value of the accelerationdata in the state where no acceleration including the acceleration ofgravity acts upon the acceleration sensor. The output means outputsmotion data (Dj) including at least the rotation motion determined bythe rotation motion determination means.

In a fourth aspect based on the first aspect, the rotation motiondetermination means includes angle calculation means (S101). The anglecalculation means calculates an angle (θ) defined by a vector from theorigin toward the start point in the two-dimensional coordinate systemand a vector from the origin toward the end point in the two-dimensionalcoordinate system. The rotation motion determination means determinesthe rotation motion based on the angle.

In a seventh aspect based on the fourth aspect, the rotation motiondetermination means further includes rotation direction determinationmeans (S102). When the angle exceeds a first threshold value (120°), therotation direction determination means determines that the input devicehas been moved while being rotated in one of two directions. When theangle is less than a second threshold value (70°), the rotationdirection determination means determines that the input device has beenmoved while being rotated in the other of the two directions withrespect to the rotation axis. The output means outputs the motion dataincluding the rotation direction (positive value or negative value of S)determined by the rotation direction determination means.

In a tenth aspect based on the fourth aspect, the rotation motiondetermination means further includes rotation angle determination means(S102). The rotation angle determination means determines a rotationangle (value of S) of the input device based on a value of the angle.The output means outputs the motion data including the rotation angledetermined by the rotation angle determination means.

In second, fifth, ninth, and eleventh aspects based on the first,fourth, seventh, and tenth aspects, the motion detection apparatusfurther comprises storage means (33). The storage means stores theacceleration data sequentially obtained by the data obtaining means. Therotation motion determination means sets a coordinate point in thetwo-dimensional coordinate system which is represented by the firstacceleration data obtained in the predetermined period, among theacceleration data stored in the storage means, as the start point; andsets a coordinate point in the two-dimensional coordinate system whichis represented by the last acceleration data obtained in thepredetermined period, among the acceleration data stored in the storagemeans, as the end point.

In third, sixth, ninth, and twelfth aspects based on the first, fourth,seventh, and tenth aspects, the acceleration sensor detects anacceleration of the input device in each of three axial directions (X-,Y- and Z-axis directions) perpendicular to one another. The rotationmotion determination means sets a time period in which acceleration datain a first axial direction (Z-axis direction) of the three axialdirections exceeds a predetermined value as the predetermined period(Yes in S62). The two-dimensional coordinate system has the coordinateaxes defined based on components of a second axial direction and a thirdaxial direction (X- and Y-axis directions) of the three axialdirections. The rotation motion determination means determines therotation motion using acceleration data in the second axial directionand the third axial direction which has been obtained first and last inthe predetermined period and stored in the storage means.

In a thirteenth aspect based on the first aspect, the accelerationsensor detects an acceleration including at least a centrifugalcomponent generated when the input device is swung by a user so as tooutput acceleration data. The rotation motion determination means sets,as the start point, a coordinate point in the two-dimensional coordinatesystem which is represented by acceleration data obtained at the startof a period in which an acceleration of the centrifugal componentexceeds a threshold value, among the acceleration data obtained by thedata obtaining means; and sets, as the end point, a coordinate point inthe two-dimensional coordinate system which is represented byacceleration data obtained at the end of the period, among theacceleration data obtained by the data obtaining means.

A fourteenth aspect of the present invention is directed to a storagemedium having stored thereon a motion determining program executable bya computer (30) of a motion determining apparatus for detecting a motionof an input device including an acceleration sensor for determining anacceleration in each of at least two axial directions. The motiondetermining program causes the computer to execute a data obtainingstep, a rotation motion determination step, and an output step. The dataobtaining step obtains acceleration data which is output from theacceleration sensor. The rotation motion determination step determines arotation motion of the input device around a predetermined direction asa rotation axis, by comparing a start point in a two-dimensionalcoordinate system which is represented by the first acceleration dataobtained in a predetermined period, and an end point in thetwo-dimensional coordinate system which is represented by the lastacceleration data obtained in the predetermined period, whereincoordinate axes of the two-dimensional coordinate system are definedbased on components of the two axial directions of the accelerationdata, and an origin of the two-dimensional coordinate system representsa value of the acceleration data in the state where no accelerationincluding the acceleration of gravity acts upon the acceleration sensor.The output step outputs motion data including at least the rotationmotion determined in the rotation motion determination step.

In a seventeenth aspect based on the fourteenth aspect, the rotationmotion determination step includes an angle calculation step. The anglecalculation step calculates an angle defined by a vector from the origintoward the start point in the two-dimensional coordinate system and avector from the origin toward the end point in the two-dimensionalcoordinate system. In the rotation motion determination step, therotation motion is determined based on the angle.

In a twentieth aspect based on the seventeenth aspect, the rotationmotion determination step further includes a rotation directiondetermination step. When the angle exceeds a first threshold value,rotation direction determination step determines that the input devicehas been moved while being rotated in one of two directions. When theangle is less than a second threshold value, the rotation directiondetermination step determines that the input device has been moved whilebeing rotated in the other of the two directions with respect to therotation axis. In the output step, the motion data including therotation direction determined in the rotation direction determinationstep is output.

In a twenty-third aspect based on the seventeenth aspect, the rotationmotion determination step further includes a rotation angledetermination step. The rotation angle determination step determines arotation angle of the input device based on a value of the angle. In theoutput step, the motion data including the rotation angle determined inthe rotation angle determination step is output.

In finteenth, eighteenth, twenty-first, and twenty-fourth aspects basedon the forteenth, seventeenth, twentieth, and twenty-third aspects, themotion determining program further causes the computer to execute astorage control step. The storage control step stores the accelerationdata, sequentially obtained in the data obtaining step, in a memory(30). In the rotation motion determination step, a coordinate point inthe two-dimensional coordinate system which is represented by the firstacceleration data obtained in the predetermined period, among theacceleration data stored in the memory, is set as the start point; and acoordinate point in the two-dimensional coordinate system which isrepresented by the last acceleration data obtained in the predeterminedperiod, among the acceleration data stored in the memory, is set as theend point.

In sixteenth, nineteenth, twenty-second, and twenty-fifth aspects basedon the finteenth, eighteenth, twenty-first, and twenty-fourth aspects,the acceleration sensor detects an acceleration of the input device ineach of three axial directions perpendicular to one another. In therotation motion determination step, a time period in which accelerationdata in a first axial direction of the three axial directions exceeds apredetermined value is set as the predetermined period. Thetwo-dimensional coordinate system has the coordinate axes defined basedon components of a second axial direction and a third axial direction ofthe three axial directions. In the rotation motion determination step,the rotation motion is determined using acceleration data in the secondaxial direction and the third axial direction which has been obtainedfirst and last in the predetermined period and stored in the memory.

In a twenty-sixth aspect based on the fourteenth aspect, theacceleration sensor detects an acceleration including at least acentrifugal component generated when the input device is swung by a userso as to output acceleration data. In the rotation motion determinationstep, a coordinate point in the two-dimensional coordinate system whichis represented by acceleration data obtained at the start of a period inwhich an acceleration of the centrifugal component exceeds a thresholdvalue, among the acceleration data obtained in the data obtaining step,is set as the start point; and a coordinate point in the two-dimensionalcoordinate system which is represented by acceleration data obtained atthe end of the period, among the acceleration data obtained in the dataobtaining step, is set as the end point.

According to the first aspect, when the user rotates the input devicearound a predetermined direction as a rotation axis, the rotation motioncan be accurately determined. Since the rotation motion given to theinput device can be used as an operation input, the variety ofoperations which can be input to the input device is widened. Thedetermination of the rotation motion only requires some type ofacceleration to act upon the input device while changing in accordancewith the rotation motion. The rotation motion can be determined using achange in, for example, the acceleration of gravity or an accelerationgenerated by the user swinging the input device.

According to the fourth aspect, the tendency of the accelerationchanging in accordance with the rotation motion can be easily determinedusing an angle defined by a vector from the origin toward the startpoint and a vector from the origin toward the end point in thetwo-dimensional coordinate system.

According to the seventh aspect, when the user performs a compositemotion including a plurality of motions, for example, when the userswings while rotating the input device, the direction of the rotationmotion of the input device can be determined. Since a composite motionincluding the rotation motion given to the input device can be used asan operation input, the variety of operations which can be input to theinput device is further widened.

According to the tenth aspect, the rotation angle at which the user hasrotated the input device can be determined. Since the rotation anglegiven to the input device can be used as an operation input, the varietyof operations which can be input to the input device is further widened.

According to the second, fifth, ninth, and eleventh aspects, theacceleration data representing the start point and the end point can beeasily extracted by sequentially storing the acceleration data obtainedin a period covering the predetermined period.

According to the third, sixth, ninth, and twelfth aspects, among theacceleration data in the three axial directions perpendicular to oneanother, the acceleration data in the second and third axial directionsin a period in which the acceleration data in the first axial directionshows a value exceeding a predetermined value is used for thedetermination. Accordingly, the period in which the input device isswung can be determined by a setting such that the acceleration obtainedwhen the user swings the input device has an influence on the firstaxial direction. As a result, the motion of the input device beingrotated by the user can be determined from the start until the end ofthe swing. When the user performs a composite motion including aplurality of motions, for example, when the user swings while rotatingthe input device, the direction of the rotation motion of the inputdevice can be determined. Since such a composite motion of the inputdevice can be used as an operation input, the variety of operationswhich can be input to the input device is further widened.

According to the thirteenth aspect, the acceleration data, which isobtained at the start and at the end of a period in which theacceleration generated when the user swings the input device exceeds apredetermined value, is used for the determination. Therefore, thedetermination is made possible using acceleration data obtained at thestart of the swing and at the end of the swing. As a result, the motionof the input device being rotated by the user can be determined from thestart until the end of the swing.

A storage medium having a motion determining program according to thepresent invention stored thereon provides the same effects as those ofthe above-described motion determining apparatus.

These and other objects, features, aspects and advantages of the presentinvention will become more apparent from the following detaileddescription of the present invention when taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an external view of a game system 1 according to an embodimentof the present invention;

FIG. 2 is a functional block diagram of a game apparatus 3 shown in FIG.1;

FIG. 3 is an isometric view of a controller 7 shown in FIG. 1 seen fromthe top rear side thereof;

FIG. 4 is an isometric view of the controller 7 shown in FIG. 3 seenfrom the bottom rear side thereof;

FIG. 5A is an isometric view of the controller 7 shown in FIG. 3 in thestate where an upper casing is removed;

FIG. 5B is an isometric view of the controller 7 shown in FIG. 3 in thestate where a lower casing is removed;

FIG. 6 is a block diagram illustrating a structure of the controller 7shown in FIG. 3;

FIG. 7 shows how the controller 7 shown in FIG. 3 is used to perform agame operation;

FIG. 8 shows an example of a tennis game image displayed on a monitor 2in accordance with X-, Y- and Z-axis direction acceleration datareceived from the controller 7 shown in FIG. 3;

FIG. 9A through FIG. 9D are exemplary graphs, X and Y axes of which eachrepresent whether an acceleration represented by each of the X- andY-axis direction acceleration data is positive or negative as well asthe magnitude of such an acceleration;

FIG. 10 is an example of a shift of acceleration data obtained in one ofFIG. 9A through FIG. 9D by a leftward swing;

FIG. 11 shows a triangle area A45 defined by straight lines connectingpoints P4 and P5 which are continuous in a time series manner and theorigin shown in FIG. 10;

FIG. 12 shows an area A13 obtained by accumulating triangles defined bypoints P1 through P3 which are continuous in a time series manner andthe origin shown in FIG. 10 and an area A36 obtained by accumulatingtriangles defined by points P3 through P6 which are continuous in a timeseries manner and the origin shown in FIG. 10;

FIG. 13 is an isometric view of the controller 7 shown in FIG. 3illustrating twisting directions thereof;

FIG. 14A through FIG. 14C are graphs each illustrating an example ofvalues of acceleration represented by each of the X- and Y-axisdirection acceleration data in accordance with the twist given to thecontroller 7;

FIG. 15 is a graph illustrating an example of spin parameter Scalculated in accordance with the angle θ shown in FIG. 14A through FIG.14C;

FIG. 16A through FIG. 16C illustrate the relationship between the statewhere the controller 7 is inclined upward or downward and the coordinateaxes in such a state;

FIG. 17 is a graph illustrating an example of up-down angle UDcalculated in accordance with Z-axis direction acceleration data;

FIG. 18 shows main data stored in the main memory 33 of the gameapparatus 3;

FIG. 19 is a flowchart illustrating a flow of the game processingexecuted by the game apparatus 3;

FIG. 20 is a flowchart illustrating a sub-routine of a detailedoperation of initial motion recognition processing in step 51 shown inFIG. 19;

FIG. 21 is a flowchart illustrating a sub-routine of a detailedoperation of animation start processing in step 52 shown in FIG. 19;

FIG. 22 is a flowchart illustrating a sub-routine of a detailedoperation of first behavior processing in step 53 shown in FIG. 19;

FIG. 23 is a flowchart illustrating a sub-routine of a detailedoperation of second behavior processing in step 54 shown in FIG. 19;

FIG. 24 shows timing of motion recognition processing, animationprocessing, and ball behavior processing;

FIG. 25 shows exemplary behaviors determined in accordance with the spinparameter S; and

FIG. 26 shows an example of a first ball trajectory TR1 and a secondball trajectory TR2.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

With reference to FIG. 1, a motion determining apparatus according toone embodiment of the present invention will be described. Hereinafter,in order to give a specific description, a game system 1 using a motiondetermining apparatus according to the present invention will be used asan example. FIG. 1 is an external view illustrating the game system 1.In the following description, the game system 1 includes an installationtype game apparatus corresponding to a motion determining apparatusaccording to the present invention.

As shown in FIG. 1, the game system 1 includes an installation type gameapparatus (hereinafter, referred to simply as a “game apparatus”) 3,which is connected to a display (hereinafter, referred to as a“monitor”) 2 including a speaker 2 a of a home-use TV receiver or thelike via a connection cord, and a controller 7 for giving operationinformation to the game apparatus 3. The game apparatus 3 is connectedto a receiving unit 6 via a connection terminal. The receiving unit 6receives transmission data which is wirelessly transmitted from thecontroller 7. The controller 7 and the game apparatus 3 are connected toeach other by wireless communication. On the game apparatus 3, anoptical disc 4 as an example of an exchangeable information storagemedium is detachably mounted. The game apparatus 3 includes a powerON/OFF switch, a game processing reset switch, and an OPEN switch foropening a top lid of the game apparatus 3 on a top main surface of thegame apparatus 3. When a player presses the OPEN switch, the lid isopened, so that the optical disc 4 is mounted or dismounted.

On the game apparatus 3, an external memory card 5 is detachably mountedwhen necessary. The external memory card 5 has a backup memory or thelike mounted thereon for fixedly storing saved data or the like. Thegame apparatus 3 executes a game program or the like stored on theoptical disc 4 and displays the result on the monitor 2 as a game image.The game apparatus 3 can also reproduce a state of a game played in thepast using saved data stored on the memory card 5 and display the gameimage on the monitor 2. A player playing with the game apparatus 3 canenjoy the game by operating the controller 7 while watching the gameimage displayed on the monitor 2.

The controller 7 wirelessly transmits the transmission data from acommunication section 75 included therein (described later) to the gameapparatus 3 connected to the receiving unit 6, using the technology of,for example, Bluetooth (registered trademark). The controller 7 isoperation means for mainly operating a player object appearing in a gamespace displayed on the monitor 2. The controller 7 includes an operationsection having a plurality of operation buttons, a key, a stick and thelike. As described later in detail, the controller 7 also includes animaging information calculation section 74 for taking an image viewedfrom the controller 7. As an example of an imaging subject of theimaging information calculation section 74, two LED modules(hereinafter, referred to as “markers”) 8L and 8R are provided in thevicinity of a display screen of the monitor 2. The markers 8L and 8Reach output infrared light forward from the monitor 2. In thisembodiment, imaging information by the imaging information calculationsection 74 is not used, and therefore the markers 8L and 8R are notabsolutely necessary.

With reference to FIG. 2, a structure of the game apparatus 3 will bedescribed. FIG. 2 is a functional block diagram of the game apparatus 3.

As shown in FIG. 2, the game apparatus 3 includes, for example, a RISCCPU (central processing unit) 30 for executing various types ofprograms. The CPU 30 executes a start program stored in a boot ROM (notshown) to, for example, initialize memories including a main memory 33,and then executes a game program stored on the optical disc 4 to performgame processing or the like in accordance with the game program. Thegame program stored on the optical disc 4 includes a motion determiningprogram according to the present invention. The CPU 30 also performsmotion detection processing for determining a motion of the controller 7as a part of the game processing. The CPU 30 is connected to a GPU(Graphics Processing Unit) 32, the main memory 33, a DSP (Digital SignalProcessor) 34, and an ARAM (Audio RAM) 35 via a memory controller 31.The memory controller 31 is connected to a controller I/F (interface)36, a video I/F 37, an external memory I/F 38, an audio I/F 39, and adisc I/F 41 via a predetermined bus. The controller I/F 36, the videoI/F 37, the external memory I/F 38, the audio I/F 39 and the disc I/F 41are respectively connected to a receiving unit 6, the monitor 2, theexternal memory card 5, the speaker 2 a and a disc drive 40.

The GPU 32 performs image processing based on an instruction from theCPU 30. The GPU 32 includes, for example, a semiconductor chip forperforming calculation processing necessary for displaying 3D graphics.The GPU 32 performs the image processing using a memory dedicated forimage processing (not shown) and a part of the storage area of the mainmemory 33. The GPU 32 generates game image data and a movie to bedisplayed on the monitor 2 using such memories, and outputs thegenerated data or movie to the monitor 2 via the memory controller 31and the video I/F 37 as necessary.

The main memory 33 is a storage area used by the CPU 30, and stores agame program or the like necessary for processing performed by the CPU30 as necessary. For example, the main memory 33 stores a game programread from the optical disc 4 by the CPU 30, various types of data or thelike. The game program, the various types of data or the like stored inthe main memory 33 are executed by the CPU 30.

The DSP 34 processes sound data or the like generated by the CPU 30during the execution of the game program. The DSP 34 is connected to theARAM 35 for storing the sound data or the like. The ARAM 35 is used whenthe DSP 34 performs predetermined processing (for example, storage ofthe game program or sound data already read). The DSP 34 reads the sounddata stored in the ARAM 35 and outputs the sound data to the speaker 2 aincluded in the monitor 2 via the memory controller 31 and the audio I/F39.

The memory controller 31 comprehensively controls data transfer, and isconnected to the various I/Fs described above. The controller I/F 36includes, for example, four controllers I/F 36 a through 36 d, andcommunicably connects the game apparatus 3 to an external device whichis engageable via connectors of the controller I/F 36 a through 36 d.For example, the receiving unit 6 is engaged with such a connector andis connected to the game apparatus 3 via the controller I/F 36. Asdescribed above, the receiving unit 6 receives the transmission datafrom the controller 7 and outputs the transmission data to the CPU 30via the controller I/F 36. The video I/F 37 is connected to the monitor2. The external memory I/F 38 is connected to the external memory card 5and is accessible to a backup memory or the like provided in theexternal card 5. The audio I/F 39 is connected to the speaker 2 a builtin the monitor 2, and is connected such that the sound data read by theDSP 34 from the ARAM 35 or sound data directly output from the discdrive 40 is output from the speaker 2 a. The disc I/F 41 is connected tothe disc drive 40. The disc drive 40 reads data stored at apredetermined reading position of the optical disc 4 and outputs thedata to a bus of the game apparatus 3 or the audio I/F 39.

With reference to FIG. 3 and FIG. 4, the controller 7 as an example ofthe input device according to the present invention will be described.FIG. 3 is an isometric view of the controller 7 seen from the top rearside thereof. FIG. 4 is an isometric view of the controller 7 seen fromthe bottom rear side thereof.

As shown in FIG. 3 and FIG. 4, the controller 7 includes a housing 71formed by plastic molding or the like. The housing 71 has a plurality ofoperation sections 72. The housing 71 has a generally parallelepipedshape extending in a longitudinal direction from front to rear. Theoverall size of the housing 71 is small enough to be held by one hand ofan adult or even a child.

At the center of a front part of a top surface of the housing 71, across key 72 a is provided. The cross key 72 a is a cross-shapedfour-direction push switch. The cross key 72 a includes operationportions corresponding to the four directions represented by the arrows(front, rear, right and left), which are respectively located oncross-shaped projecting portions arranged at an interval of 90 degrees.The player selects one of the front, rear, right and left directions bypressing one of the operation portions of the cross key 72 a. Through anoperation on the cross key 72 a, the player can, for example, instruct adirection in which a player character or the like appearing in a virtualgame world is to move or a direction in which the cursor is to move.

The cross key 72 a is an operation section for outputting an operationsignal in accordance with the above-described direction input operationperformed by the player, but such an operation section may be providedin another form. For example, the cross key 72 a may be replaced with acomposite switch including a push switch including ring-shapedfour-direction operation section and a center switch provided at thecenter thereof. Alternatively, the cross key 72 a may be replaced withan operation section which includes an inclinable stick projecting fromthe top surface of the housing 71 and outputs an operation signal inaccordance with the inclining direction of the stick. Stillalternatively, the cross key 72 a may be replaced with an operationsection which includes a disc-shaped member horizontally slidable andoutputs an operation signal in accordance with the sliding direction ofthe disc-shaped member. Still alternatively, the cross key 72 a may bereplaced with a touch pad. Still alternatively, the cross key 72 a maybe replaced with an operation section which includes switchesrepresenting at least four directions (front, rear, right and left) andoutputs an operation signal in accordance with the switch pressed by theplayer.

Rearward to the cross key 72 a on the top surface of the housing 71, aplurality of operation buttons 72 b through 72 g are provided. Theoperation buttons 72 b through 72 g are each an operation section foroutputting a respective operation signal when the player presses a headthereof. For example, the operation buttons 72 b through 72 d areassigned functions of an X button, a Y button and a B button. Theoperation buttons 72 e through 72 g are assigned functions of a selectswitch, a menu switch and a start switch, for example. The operationbuttons 72 b through 72 g are assigned various functions in accordancewith the game program executed by the game apparatus 3, but this willnot be described in detail because the functions are not directlyrelevant to the present invention. In an exemplary arrangement shown inFIG. 3, the operation buttons 72 b through 72 d are arranged in a lineat the center in the front-rear direction on the top surface of thehousing 71. The operation buttons 72 e through 72 g are arranged in aline in the left-right direction between the operation buttons 72 b and72 d. The operation button 72 f has a top surface thereof buried in thetop surface of the housing 71, so as not to be inadvertently pressed bythe player.

Forward to the cross key 72 a on the top surface of the housing 71, anoperation button 72 h is provided. The operation button 72 h is a powerswitch for remote-controlling the power of the game apparatus 3 to be onor off. The operation button 72 h also has a top surface thereof buriedin the top surface of the housing 71, so as not to be inadvertentlypressed by the player.

Rearward to the operation button 72 c on the top surface of the housing71, a plurality of LEDs 702 are provided. The controller 7 is assigned acontroller type (number) so as to be distinguishable from the othercontrollers 7. For example, the LEDs 702 are used for informing theplayer of the controller type which is currently set to controller 7that he/she is using. Specifically, when the controller 7 transmits thetransmission data to the receiving unit 6, one of the plurality of LEDscorresponding to the controller type is lit up.

On a bottom surface of the housing 71, a recessed portion is formed. Asdescribed later in detail, the recessed portion is formed at a positionat which an index finger or middle finger of the player is located whenthe player holds the controller 7. On a rear slope surface of therecessed portion, an operation button 72 i is provided. The operationbutton 72 i is an operation section acting as, for example, an A button.The operation button 72 i is used, for example, as a trigger switch in ashooting game, or for attracting attention of a player object to apredetermined object.

On a front surface of the housing 71, an imaging element 743 (see FIG.5B) included in the imaging information calculation section 74 isprovided. The imaging information calculation section 74 is a system foranalyzing image data taken by the controller 7 and detecting theposition of the center of gravity, the size and the like of an areahaving a high brightness in the image data. The imaging informationcalculation section 74 has, for example, a maximum sampling period ofabout 200 frames/sec., and therefore can trace and analyze even arelatively fast motion of the controller 7. On a rear surface of thehousing 71, a connector 73 is provided. The connector 73 is, forexample, a 32-pin edge connector, and is used for engaging andconnecting the controller 7 with a connection cable. The presentinvention does not use information from the imaging informationcalculation section 74, and thus the imaging information calculationsection 74 will not be described in further detail.

In order to give a specific description, a coordinate system which isset for the controller 7 will be defined. As shown in FIG. 3 and FIG. 4,X-, Y- and Z-axis directions perpendicular to one another are definedfor the controller 7. Specifically, the longitudinal direction of thehousing 71, i.e., the front-rear direction of the controller 7, is setas a Z-axis direction. A direction toward the front surface of thecontroller 7 (the surface having the imaging information calculationsection 74) is set as a positive Z-axis direction. The up-to-downdirection of the controller 7 is set as a Y-axis direction. A directiontoward the top surface of the controller housing 71 (the surface havingthe cross key 72 a and the like) is set as a positive Y-axis direction.The left-right direction of the controller 7 is set as an X-axisdirection. A direction toward a left surface of the housing 71 (thesurface which is not shown in FIG. 3 but is shown in FIG. 4) is set as apositive X-axis direction.

With reference to FIG. 5A and FIG. 5B, an internal structure of thecontroller 7 will be described. FIG. 5A is an isometric viewillustrating a state where an upper casing (a part of the housing 71) ofthe controller 7 is removed. FIG. 5B is an isometric view illustrating astate where a lower casing (a part of the housing 71) of the controller7 is removed. FIG. 5B shows a reverse side of a substrate 700 shown inFIG. 5A.

As shown in FIG. 5A, the substrate 700 is fixed inside the housing 71.On a top main surface of the substrate 700, the operation buttons 72 athrough 72 h, an acceleration sensor 701, the LEDs 702, a quartzoscillator 703, a wireless module 753, an antenna 754 and the like areprovided. These elements are connected to a microcomputer 751 (see FIG.6) via lines (not shown) formed on the substrate 700 and the like. Theacceleration sensor 701 detects and outputs acceleration, which can beused to calculate inclination, oscillation and the like in athree-dimensional space in which the controller 7 is located.

As shown in FIG. 6, the controller 7 preferably includes a three-axis,linear acceleration sensor 701 that detects linear acceleration in threedirections, i.e., the up/down direction (Y-axis shown in FIG. 3), theleft/right direction (X-axis shown in FIG. 3), and the forward/backwarddirection (Z-axis shown in FIG. 3). Alternatively, a two axis linearaccelerometer that only detects linear acceleration along each of theX-axis and Y-axis (or other pair of axes) may be used in anotherembodiment depending on the type of control signals desired. As anon-limiting example, the three-axis or two-axis linear accelerometer701 maybe of the type available from Analog Devices, Inc. orSTMicroelectronics N.V. Preferably, the acceleration sensor 701 is anelectrostatic capacitance or capacitance-coupling type that is based onsilicon micro-machined MEMS (microelectromechanical systems) technology.However, any other suitable accelerometer technology (e.g.,piezoelectric type or piezoresistance type) now existing or laterdeveloped may be used to provide the three-axis or two-axis linearacceleration sensor 701.

As one skilled in the art understands, linear accelerometers, as used inacceleration sensor 701, are only capable of detecting accelerationalong a straight line corresponding to each axis of the accelerationsensor. In other words, the direct output of the acceleration sensor 701is limited to signals indicative of linear acceleration (static ordynamic) along each of the two or three axes thereof. As a result, theacceleration sensor 701 cannot directly detect movement along anon-linear (e.g. arcuate) path, rotation, rotational movement, angulardisplacement, tilt, position, attitude or any other physicalcharacteristic.

However, through additional processing of the linear accelerationsignals output from the acceleration sensor 701, additional informationrelating to the controller 7 can be inferred or calculated (i.e.,determined), as one skilled in the art will readily understand from thedescription herein. For example, by detecting static, linearacceleration (i.e., gravity), the linear acceleration output of theacceleration sensor 701 can be used to determine tilt of the objectrelative to the gravity vector by correlating tilt angles with detectedlinear acceleration. In this way, the acceleration sensor 701 can beused in combination with the micro-computer 751 (or another processor)to determine tilt, attitude or position of the controller 7. Similarly,various movements and/or positions of the controller 7 can be calculatedthrough processing of the linear acceleration signals generated by theacceleration sensor 701 when the controller 7 containing theacceleration sensor 701 is subjected to dynamic accelerations by, forexample, the hand of a user, as will be explained in detail below. Inanother embodiment, the acceleration sensor 701 may include an embeddedsignal processor or other type of dedicated processor for performing anydesired processing of the acceleration signals output from theaccelerometers therein prior to outputting signals to micro-computer751. For example, the embedded or dedicated processor could convert thedetected acceleration signal to a corresponding tilt angle (or otherdesired parameter) when the acceleration sensor is intended to detectstatic acceleration (i.e., gravity).

The communication section 75 including the wireless module 753 and theantenna 754 allows the controller 7 to act as a wireless controller. Thequartz oscillator 703 generates a reference clock of the microcomputer751 described later.

As shown in FIG. 5B, at a front edge of a bottom main surface of thesubstrate 700, the image information calculation section 74 is provided.The image information calculation section 74 includes an infrared filter741, a lens 742, the imaging element 743 and an image processing circuit744 located in this order from the front surface of the controller 7.These elements are attached to the bottom main surface of the substrate700. At a rear edge of the bottom main surface of the substrate 700, theconnector 73 is attached. The operation button 72 i is attached on thebottom main surface of the substrate 700 rearward to the imageinformation calculation section 74, and cells 705 are accommodatedrearward to the operation button 72 i. On the bottom main surface of thesubstrate 700 between the cells 705 and the connector 73, a vibrator 704is attached. The vibrator 704 maybe, for example, a vibration motor or asolenoid. The controller 7 is vibrated by an actuation of the vibrator704, and the vibration is conveyed to the player holding the controller7. Thus, a so-called vibration-responsive game is realized.

With reference to FIG. 6, the internal structure of the controller 7will be described. FIG. 6 is a block diagram showing the structure ofthe controller 7.

The imaging information calculation section 74 includes the infraredfilter 741, the lens 742, the imaging element 743 and the imageprocessing circuit 744. The infrared filter 741 allows only infraredlight to pass therethrough, among light incident on the front surface ofthe controller 7. The lens 742 collects the infrared light which haspassed through the infrared filter 741 and outputs the infrared light tothe imaging element 743. The imaging element 743 is a solid-stateimaging device such as, for example, a CMOS sensor or a CCD. The imagingelement 743 takes an image of the infrared light collected by the lens742. Accordingly, the imaging element 743 takes an image of only theinfrared light which has passed through the infrared filter 741 andgenerates image data. The image data generated by the imaging element743 is processed by the image processing circuit 744. Specifically, theimage processing circuit 744 processes the image data obtained from theimaging element 743, detects an area thereof having a high brightness,and outputs processing result data representing the detected coordinateposition and size of the area to the communication section 75. Theimaging information calculation section 74 is fixed to the housing 71 ofthe controller 7. The imaging direction of the imaging informationcalculation section 74 can be changed by changing the direction of thehousing 71.

As described above, the acceleration sensor 701 detects and outputs theacceleration in the form of components of three axial directions of thecontroller 7, i.e., the components of the up-down direction (Y-axisdirection), the left-right direction (X-axis direction), and thefront-rear direction (the Z-axis direction) of the controller 7. Datarepresenting the acceleration as the components of the three axialdirections detected by the acceleration sensor 701 is output to thecommunication section 75. Based on the acceleration data which is outputfrom the acceleration sensor 701, a motion of the controller 7 can bedetermined. As the acceleration sensor 701, a sensor for detecting anacceleration in two of the three axial directions may be used dependingon the data needed for a particular application.

The communication section 75 includes the microcomputer 751, a memory752, the wireless module 753 and the antenna 754. The microcomputer 751controls the wireless module 753 for transmitting the transmission datawhile using the memory 752 as a storage area during processing.

Data from the controller 7 including an operation signal (key data) fromthe operation section 72, acceleration signals in the three axialdirections (X-axis, Y-axis and Z-axis direction acceleration data) fromthe acceleration sensor 701, and the processing result data from theimaging information calculation section 74 are output to themicrocomputer 751. The microcomputer 751 temporarily stores the inputdata (key data, X-axis, Y-axis and Z-axis direction acceleration data,and the processing result data) in the memory 752 as the transmissiondata which is to be transmitted to the receiving unit 6. The wirelesstransmission from the communication section 75 to the receiving unit 6is performed at a predetermined time interval. Since game processing isgenerally performed at a cycle of 1/60 sec., the wireless transmissionneeds to be performed at a cycle of a shorter time period. Specifically,the game processing unit is 16.7 ms ( 1/60 sec.), and the transmissioninterval of the communication section 75 structured using the Bluetooth(registered trademark) technology is 5 ms. At the transmission timing tothe receiving unit 6, the microcomputer 751 outputs the transmissiondata stored in the memory 752 as a series of operation information tothe wireless module 753. The wireless module 753 uses, for example, theBluetooth (registered trademark) technology to radiate the operationinformation from the antenna 754 as a carrier wave signal of apredetermined frequency. Thus, the key data from the operation section72, the X-axis, Y-axis and Z-axis direction acceleration data from theacceleration sensor 701, and the processing result data from the imaginginformation calculation section 74 are transmitted from the controller7. The receiving unit 6 of the game apparatus 3 receives the carrierwave signal, and the game apparatus 3 demodulates or decodes the carrierwave signal to obtain the series of operation information (the key data,the X-axis, Y-axis and Z-axis direction acceleration data, and theprocessing result data). Based on the obtained operation information andthe game program, the CPU 30 of the game apparatus 3 performs the gameprocessing. In the case where the communication section 75 is structuredusing the Bluetooth (registered trademark) technology, the communicationsection 75 can have a function of receiving transmission data which iswirelessly transmitted from other devices.

Before describing specific processing performed by the game apparatus 3,an overview of a game played by the game apparatus 3 will be described.As shown in FIG. 7, the entire controller 7 is small enough to be heldby one hand of an adult or even a child. In order to play the game witha game system 1 using the controller 7, the player holds the controller7 with one hand (for example, right hand) such that the front surface ofthe controller 7 is directed forward. For example, the player holds thecontroller 7 with his/her thumb on the left surface thereof, withhis/her palm on the top surface thereof, and with his/her index finger,middle finger, third finger and fourth finger on the bottom surfacethereof, such that the front surface thereof is directed forward, i.e.,away from himself/herself. The player holds the controller 7 as ifhe/she was holding a tennis racket.

The player swings his/her arm holding the controller 7 from his/herright to left (hereinafter, such a motion will be referred to as a“leftward swing” or swings his/her arm holding the controller 7 fromhis/her left to right (hereinafter, such a motion will be referred to asa “rightward swing”) based on the game image displayed on the monitor 2.By such a swinging motion, the player gives operation information(specifically, X-axis, Y-axis and Z-axis direction acceleration data) tothe game apparatus 3 from the controller 7. In addition to theabove-mentioned leftward swing and rightward swing, the player can, forexample, perform a leftward swing or a rightward swing while swinging upthe controller 7, swinging down the controller 7, or twisting thecontroller 7 left or right. By such a motion, the player can givevarious types of X-axis, Y-axis and Z-axis direction acceleration datato the game apparatus 3 from the controller 7.

As shown in FIG. 8, a tennis game or the like is displayed on themonitor 2 in accordance with the X-axis, Y-axis and Z-axis directionacceleration data received from the controller 7. Specifically, a tenniscourt set in a virtual game space is displayed on the monitor 2 as athree-dimensional game image. In the virtual game space, a playercharacter PC to be operated by the player, an opponent character ECacting as an opponent to the player character PC, a ball character BCrepresenting a tennis ball moving on the tennis court, and the like arelocated. Such characters are displayed on the monitor 2. Hereinafter,motion determining processing according to the present invention will bedescribed. In order to give a specific description, it is assumed that agame program for the tennis game is stored on the optical disc 4 andthat the CPU 30 performs the motion determining processing fordetermining a motion of the controller 7 during the tennis game.

The player character PC holds a tennis racket and is located on thetennis court which is set in the virtual game space. In accordance witha motion of the player of swinging the controller 7, an animation of theplayer character PC of swinging the tennis racket is displayed. When theplayer character PC hits back the ball character BC flying toward theplayer character PC with the tennis racket, the ball character BC hit bythe tennis racket flies toward the court of the opponent character EC.Namely, by the player holding the controller 7 performing a motion ofswinging the controller 7, the player character PC is displayed asperforming a motion of swinging the tennis racket in a similar manner.The player can experience a virtual sports game as if he/she was playingtennis with a tennis racket.

In the case where the player character PC represents a right-handedtennis player, when the player performs a “leftward swing” of thecontroller 7, the player character PC swings the tennis racket forehand.When the player performs a “rightward swing” of the controller 7, theplayer character PC swings the tennis racket backhand. Namely, theplayer character PC swings the tennis racket in the same direction asthe player swings the controller 7.

In accordance with the timing or velocity at which the player swings thecontroller 7, the flying direction or velocity of the ball character BChit by the tennis racket swung by the player character PC changes. Bythe player performing a leftward swing or a rightward swing whileswinging up or swinging down the controller 7, the height of the flyingtrajectory of the ball character BC changes. By the player performing aleftward swing or a rightward swing while twisting the controller 7 leftor right, the player character PC can be displayed as hitting back theball character BC with a so-called topspin or backspin toward theopponent character EC. As described later in detail, such motions can bedistinguished by the X-axis, Y-axis and Z-axis direction accelerationdata which is output from the controller 7. In this manner, a tennisgame reflecting various motions given by the player to the controller 7can be represented.

Now, a method for determining whether or not the controller 7 is beingswung will be described. When the Z-axis direction acceleration datarepresents a positive Z-axis direction value exceeding a thresholdvalue, the game apparatus 3 determines that the player is swinging thecontroller 7. For example, when the controller 7 is in a still state,the acceleration sensor 701 never detects an acceleration exceeding theacceleration of gravity of 9.8 m/s². When the player holding thecontroller 7 swings his/her arm as described above, the front edge ofthe controller 7 moves in an arc-shaped trajectory. Therefore, theacceleration in the positive Z-axis direction (see FIG. 3) is detectedby the influence of the centrifugal force. In this embodiment, athreshold value equal to or greater than the acceleration of gravity isset, and when the Z-axis direction acceleration data represents anacceleration exceeding the threshold value, it is determined that theplayer is swinging the controller 7.

With reference to FIG. 9A through FIG. 9D, when it is determined thatthe player is swinging the controller 7, a direction in which the playeris swinging the controller 7 (swinging direction) is determined by amethod described below using the X- and Y-axis direction accelerationdata. FIG. 9A through FIG. 9D are exemplary graphs, X and Y axes ofwhich each represent whether an acceleration represented by each of theX- and Y-axis direction acceleration data is positive or negative aswell as the magnitude of such an acceleration. The accelerationsrepresented by the X- and Y-axis direction acceleration datasimultaneously obtained at a predetermined time interval (for example,every 5 ms) are sequentially plotted in the X-Y coordinate system. InFIG. 9A through FIG. 9D, points P represent the accelerationsrepresented by the X- and Y-axis direction acceleration datasimultaneously obtained. The arrow beside the points P represents theorder in which the data is obtained. The origin ((X, Y)=(0, 0))represents the value of the acceleration data in the state where noacceleration including the acceleration of gravity acts upon theacceleration sensor 701. The numerical value “1” (corresponding to theposition indicated by the dashed circle) represents the magnitude of theacceleration of gravity.

When the player swings the controller 7, the controller 7 is acceleratedat the start of the swing and decelerated at the end of the swing.Accordingly, at the start of the swing, the controller 7 is providedwith an acceleration in the same direction as the swing. Then, themagnitude of the acceleration gradually decreases. At the end of theswing, the controller 7 is provided with an acceleration in the oppositedirection to the swing. In general, an acceleration vector (orinformation on whether the acceleration is positive or negative) whichis output from the acceleration sensor 701 is exactly opposite to theacceleration direction of the controller 7. Accordingly, at the start ofthe swing, the acceleration sensor 701 detects an acceleration in theopposite direction to the swing. Then, the magnitude of the accelerationgradually decreases. At the end of the swing, the acceleration sensor701 detects an acceleration in the same direction as the swing.

For example, when the controller 7 is accelerated in a horizontalleftward swing with the top surface thereof directed upward (i.e., whenthe acceleration direction of the controller 7 is the positive X-axisdirection), the acceleration sensor 701 provides an acceleration vectorin a negative X-axis direction. In the X-Y coordinate system in whichthe accelerations represented by the X- and Y-axis direction datasimultaneously obtained during the swing are plotted, the accelerationsshow a negative value in the X-axis direction at the start of the swingbecause the controller 7 is accelerated. Toward the end of the swing,the accelerations are plotted in the positive X-axis direction becausethe controller 7 is decelerated. In addition, the acceleration sensor701 is constantly acted upon by the acceleration of gravity. Therefore,the acceleration sensor 701 detects an acceleration of magnitude “1” ina vertical direction (in this case, in a negative Y-axis direction).Accordingly, when the player performs a horizontal leftward swing of thecontroller 7 with the top surface thereof directed upward, points P aresequentially plotted from a negative value to a positive value in theX-axis direction (in the X+ direction) with the value in the Y-axisdirection fixed at “−1” (see FIG. 9A).

When the controller 7 is accelerated in a horizontal leftward swing withthe top surface thereof directed at 90 degrees leftward with respect tothe player (i.e., when the acceleration direction of the controller 7 isthe positive Y-axis direction), the acceleration sensor 701 provides anacceleration vector in the negative Y-axis direction. In the X-Ycoordinate system in which the accelerations represented by the X- andY-axis direction data simultaneously obtained during the swing areplotted, the accelerations show a negative value in the Y-axis directionat the start of the swing because the controller 7 is accelerated.Toward the end of the swing, the accelerations are plotted in thepositive Y-axis direction because the controller 7 is decelerated. Inaddition, the acceleration sensor 701 is constantly acted upon by theacceleration of gravity. Therefore, the acceleration sensor 701 detectsan acceleration of magnitude “1” in the vertical direction (in thiscase, in the positive X-axis direction). Accordingly, when the playerperforms a horizontal leftward swing of the controller 7 with the topsurface thereof directed at 90 degrees leftward with respect to theplayer, points P are sequentially plotted from a negative value to apositive value in the Y-axis direction (in the Y+ direction) with thevalue in the X-axis direction fixed at “+1” (see FIG. 9B).

When the controller 7 is accelerated in a horizontal leftward swing withthe top surface thereof directed downward (i.e., when the accelerationdirection of the controller 7 is the negative X-axis direction), theacceleration sensor 701 provides an acceleration vector in the positiveX-axis direction. In the X-Y coordinate system in which theaccelerations represented by the X- and Y-axis direction datasimultaneously obtained during the swing are plotted, the accelerationsshows a positive value in the X-axis direction at the start of the swingbecause the controller 7 is accelerated. Toward the end of the swing,the accelerations are plotted in the negative X-axis direction becausethe controller 7 is decelerated. In addition, the acceleration sensor701 is constantly acted upon by the acceleration of gravity. Therefore,the acceleration sensor 701 detects an acceleration of magnitude “1” inthe vertical direction (in this case, in the positive Y-axis direction).Accordingly, when the player performs a horizontal leftward swing of thecontroller 7 with the top surface thereof directed downward, points Pare sequentially plotted from a positive value to a negative value inthe X-axis direction (in the X-direction) with the value in the Y-axisdirection fixed at “+1” (see FIG. 9C).

When the controller 7 is accelerated in a horizontal leftward swing withthe top surface thereof directed at 90 degrees rightward with respect tothe player (i.e., when the acceleration direction of the controller 7 isthe negative Y-axis direction), the acceleration sensor 701 provides anacceleration vector in the positive Y-axis direction. In the X-Ycoordinate system in which the accelerations represented by the X- andY-axis direction data simultaneously obtained during the swing areplotted, the accelerations show a positive value in the Y-axis directionat the start of the swing because the controller 7 is accelerated.Toward the end of the swing, the accelerations are plotted in thenegative Y-axis direction because the controller 7 is decelerated. Inaddition, the acceleration sensor 701 is constantly acted upon by theacceleration of gravity. Therefore, the acceleration sensor 701 detectsan acceleration of magnitude “1” in the vertical direction (in thiscase, in the negative X-axis direction). Accordingly, when the playerperforms a horizontal leftward swing of the controller 7 with the topsurface thereof directed at 90 degrees rightward with respect to theplayer, points P are sequentially plotted from a positive value to anegative value in the Y-axis direction (in the Y-direction) with thevalue in the X-axis direction fixed at “−1” (see FIG. 9D).

As described above, when the player performs a leftward swing of thecontroller 7, a direction in which the acceleration obtained from the X-and Y-axis direction acceleration data shifts (shifting direction)varies in accordance with the direction of the controller 7 held by theplayer. However, as is clear from FIG. 9Athrough FIG. 9D, when theplayer performs a leftward swing of the controller 7, the points P areall plotted clockwise around the origin of the X-Y coordinate system. Itis clear that when the player performs a rightward swing of thecontroller 7, the shifting direction of acceleration is opposite; i.e.,the points P are all plotted counterclockwise around the origin of theX-Y coordinate system. This means that by calculating the direction inwhich the points P are circulated with respect to the origin of the X-Ycoordinate system (circulation direction of the points P), the swingingdirection of the controller 7 provided by the player (moving directionof the controller 7) can be determined. The relationship between thecirculation direction of the points P and the swinging direction of thecontroller 7 varies in accordance with the setting of the coordinateaxes, the characteristics of the acceleration sensor, the setting of theX-Y coordinate system and the like, and may be adjusted in accordancewith such settings as necessary. Specifically, the swinging direction ofthe controller 7 can be accurately determined by analyzing the shiftingdirection of the acceleration data with respect to the direction ofacceleration of gravity based on the obtained acceleration data(represented by the dashed arrow in FIG. 9A through FIG. 9D).

In actuality, however, the points P plotted in the X-Y coordinate systemdraw a complicated curve as shown in FIG. 10 by the influence of abackswing performed by the player before swinging the controller 7 asintended, a twist, or the like. FIG. 10 shows an example of the plottedpoints P obtained when the player performs a leftward swing. At thestart of the swing, the plotted points P show a counterclockwise shift(points P1 through P3; shift L) and then show a clockwise shift (pointsP3 through P10; shift R). If the swinging direction of the controller 7is determined in the middle of shift L, the swinging direction isdetermined as rightward. Shift L is a data group having a relativelysmall magnitude of acceleration. This is because the backswing is weak.Shift L is almost radial from the origin of the X-Y coordinate system.This is because the controller 7 is swung in a different direction fromthe leftward swing or the rightward swing. Such a data group having arelatively small magnitude of acceleration and showing a shift which isalmost radial from the origin of the X-Y coordinate system is consideredto have a low reliability for determining the swinging direction. Theswinging direction can be accurately determined by using a data grouphaving a relatively large magnitude of acceleration and showing a shiftwhich is close to a circle around the origin of the X-Y coordinatesystem, for example, shift R. In other words, in order to determine theswinging direction, data having a larger magnitude of acceleration anddata showing a shift which is closer to a circle around the origin ofthe X-Y coordinate system is more reliable.

The above-described reliability is represented by an area of a triangledefined by two pieces of acceleration data which are continuous in atime series manner and the origin of the X-Y coordinate system. Forexample, as shown in FIG. 11, a triangle area A45 defined by straightlines connecting points P4 and P5 which are continuous in a time seriesmanner and the origin is used. Where the points P represent a largermagnitude of acceleration, the triangle area A45 is larger. Where thepoints P show a shift closer to a circle around the origin, the trianglearea A45 is larger. In this manner, the reliability can be representedby the triangle area A45.

FIG. 12 shows an area A13 of a region relating to points P1 through P3shown in FIG. 10 which are continuous in a time series manner, and anarea A36 of a region relating to points P3 through P6 shown in FIG. 10which are continuous in a time series manner. More specifically, theregion having the area A13 is obtained by accumulating triangles eachdefined by the origin and two adjacent points among points P1 throughP3. The region having the area A36 is obtained by accumulating triangleseach defined by the origin and two adjacent points among points P3through P6. The area A13 overlaps a part of the area A36. As shown inFIG. 12, the area A13 is an accumulated area of the triangles calculatedusing the points P1 through P3 representing a counterclockwise shiftwith respect to the origin. The area A36 is an accumulated area of thetriangles calculated using the points P3 through P6 representing aclockwise shift with respect to the origin. As is clear from FIG. 12,the area A13 is significantly smaller than the area A36. In thisembodiment, the areas of triangles defined by the points P representinga clockwise shift and the areas of triangles defined by the points Prepresenting a counterclockwise shift are each accumulated in a timeseries manner. When one of the accumulated values exceeds a thresholdvalue, the swinging direction of the controller 7 is determined based onwhether the points P defining the triangles used for forming theexceeding accumulated value show a clockwise shift or a counterclockwiseshift. In this manner, the swinging direction can be accuratelydetermined by while eliminating the influence of the data having a lowreliability. It is considered that the swinging direction can bedetermined more accurately by analyzing all the points P from the startuntil the end of the swing. In this embodiment, the threshold value isused in order to determine the swinging direction at an earlier stage ofthe swinging motion.

Now, a velocity at which the player swings the controller 7 (swingingvelocity) is determined as follows. When the player swings thecontroller 7 at a high velocity, the time period from the accelerationto the deceleration is relatively short. When the player swings thecontroller 7 at a low velocity, the time period from the acceleration tothe deceleration is relatively long. Where the player swings thecontroller 7 with the same length of stroke, the interval between thepoints P plotted in the X-Y coordinate system (hereinafter, occasionallyreferred to as a “data interval”) is larger as the player swings thecontroller 7 at a higher velocity. Accordingly, the swinging velocity ofthe controller 7 provided by the player can be calculated by determiningthe interval between the points P which are continuous in a time seriesmanner. In this embodiment, all the points P from the start until theend of the swing are analyzed, and the points P having the largestinterval therebetween, among the intervals between points P which arecontinuous in a time series manner, are extracted. Thus, the swingingvelocity is calculated.

With reference to FIG. 13 through FIG. 15, when the player is swingingthe controller 7, a direction in which the player twists the controller7 (twisting direction) is determined by a method described below usingthe X- and Y-axis direction acceleration data. FIG. 13 is an isometricview of the controller 7 illustrating the twisting directions thereof.FIG. 14A through FIG. 14C are graphs each illustrating an example ofvalues of acceleration represented by each of the X- and Y-axisdirection acceleration data in accordance with the twist given to thecontroller 7. FIG. 15 is a graph illustrating an example of spinparameter S calculated in accordance with the angle θ shown in FIG. 14Athrough FIG. 14C. In FIG. 14A through FIG. 14C, as in FIG. 9A throughFIG. 9D, the points P are connected by arrows in the order in which thepoints P are obtained, and the origin ((X, Y)=(0, 0)) represents thevalue of the acceleration data in the state where no accelerationincluding the acceleration of gravity acts upon the acceleration sensor701.

With reference to FIG. 13, when performing a leftward swing or arightward swing of the controller 7, the player can provide thecontroller 7 with a “leftward twist” or a “rightward twist” around theZ-axis. The “leftward twist” refers to rotating the controller 7counterclockwise with respect to the player around the Z axis, and the“rightward twist” refers to rotating the controller 7 clockwise withrespect to the player around the Z axis. The result of a determinationon the twist is reflected on a spin (a topspin or a backspin) given tothe ball character BC.

In order to determine an angle at which the player twists the controller7 (twisting angle) while swinging the controller 7, it is necessary toanalyze the X- and Y-axis direction acceleration data from the startuntil the end of the swing. In this embodiment, the twisting angle ofthe controller 7 is determined using a point Ps representing the X- andY-axis direction acceleration data obtained at the start of the swing(the first point plotted in the X-Y coordinate system; start point) anda point Pe representing the X- and Y-axis direction acceleration dataobtained at the end of the swing (the last point plotted in the X-Ycoordinate system; end point).

For example, FIG. 14A shows an example of the X- and Y-axis directionacceleration data obtained from the start until the end of the swingwhen the player performs a horizontal leftward swing with the topsurface of the controller 7 being kept upward (i.e., with no twist). Anangle θ defined by a straight line connecting the start point Ps and theorigin of the X-Y coordinate system and a straight line connecting theend point Pe and the origin (hereinafter, referred to as an “angle θfrom the start point Ps to the end point Pe”) is calculated, and a spinparameter S in accordance with the angle θ is set. Since the directionof gravity acting upon the controller 7 is constant, an intermediateangle θ is obtained. The angle θ is obtained by calculating an absolutevalue of an angle defined by a vector extending from the origin of theX-Y coordinate system to the start point Ps and a vector extending fromthe origin to the end point Pe.

FIG. 14B shows an example of the X- and Y-axis direction accelerationdata obtained from the start until the end of the swing when the playerperforms a horizontal leftward swing while giving a leftward twist tothe controller 7 from the state where the top surface of the controller7 is directed upward. Since the direction of gravity acting upon thecontroller 7 changes clockwise in accordance with the twist, the angle θfrom the start Ps to the end point Pe obtained by the leftward twist islarger than the angle θ obtained with no twist.

FIG. 14C shows an example of the X- and Y-axis direction accelerationdata obtained from the start until the end of the swing when the playerperforms a horizontal leftward swing while giving a rightward twist tothe controller 7 from the state where the top surface of the controller7 is directed upward. Since the direction of gravity acting upon thecontroller 7 changes counterclockwise in accordance with the twist, theangle θ from the start Ps to the end point Pe obtained by the rightwardtwist is smaller than the angle θ obtained with no twist.

As described above, the direction or angle of a twist provided to thecontroller 7 during the swing can be determined using the angle θ fromthe start point Ps to the end point Pe. For example, in the case wherethe player is performing a leftward swing of the controller 7, thecontroller 7 is determined to be given a “leftward twist” when the angleθ is larger than a threshold value and is determined to be given a“rightward twist” when the angle θ is smaller than the threshold value.In the case where the player is performing a rightward swing of thecontroller 7, the direction of the twist is determined oppositely.Namely, in the case where the player is performing a rightward swing ofthe controller 7, the controller 7 is determined to be given a“rightward twist” when the angle θ is larger than the threshold valueand is determined to be given a “leftward twist” when the angle θ issmaller than the threshold value. Using the start point Ps and the endpoint Pe represented by the X- and Y-axis direction acceleration data ascoordinate points on the X-Y coordinate system, a rotation motion of thecontroller 7 around the Z axis, perpendicular to the X and Y axes, asthe rotation axis can be determined.

In accordance with the difference between the angle θ obtained by theleftward twist or the rightward twist and the angle θ obtained with notwist (see FIG. 14A), an amount by which the player twists thecontroller 7 (twisting amount) can be determined. In this embodiment, apredetermined conversion table is used to convert the angle θ used fordetermining the twisting direction or the twisting angle into a spinparameter S in accordance with the value of the angle θ. Thus, thesubsequent game processing is executed. A spin parameter S is, forexample, a floating-point number in the range of −1.0 to 1.0 which isdetermined in accordance with the value of the angle θ. The gameprocessing is executed such that the maximum effect of a backspin isprovided when S=−1.0, and the maximum effect of a topspin is providedwhen S=1.0.

For example, as shown in FIG. 15, when the angle θ is θ≦30°, the angle θis converted into a spin parameter S=−1.0. When the angle θ is30°<θ≦70°, the angle θ is converted into a spin parameter S linearlychanging in the range of −1.0 to 0.0. When the angle θ is 70°<θ≦120°,the angle θ is converted into a spin parameter S=0.0. When the angle θis 120<θ≦160°, the angle θ is converted into a spin parameter S linearlychanging in the range of 0.0 to 0.1. When the angle θ is 160°<θ, theangle θ is converted into a spin parameter S=1.0. By adjusting such aconversion table, the effect of reflecting a twist given to thecontroller 7 on the game processing can be adjusted.

With reference to FIG. 16A through FIG. 16C and FIG. 17, a method fordetermining a state where the controller 7 is being swung up or downwill be described. FIG. 16A through FIG. 16C illustrate the relationshipbetween the state where the controller 7 is inclined upward or downwardand the coordinate axes in such a state. FIG. 17 is a graph illustratingan example of up-down angle UD calculated in accordance with Z-axisdirection acceleration data.

In this embodiment, it is determined whether the controller 7 is beingswung up or down based on the up-down direction of the controller 7before the controller 7 is swung. For example, when the player inclinesthe front surface of the controller 7 downward at equal to or greaterthan a predetermined angle from the horizontal state before starting theswing, it is determined that the controller 7 is being swung up. Whenthe player inclines the front surface of the controller 7 upward atequal to or greater than the predetermined angle from the horizontalstate before starting the swing, it is determined that the controller 7is being swung down.

Specifically, when it is determined that the controller 7 is beingswung, the up-down direction of the controller 7 before the swing isdetermined based on the Z-axis direction acceleration data obtainedduring several frames immediately therebefore. For example, as shown inFIG. 16A, when the controller 7 is horizontal before the player startsswinging the controller 7, the acceleration of gravity acts in thenegative Y-axis direction. Therefore, the Z-axis direction accelerationdata does not reflect the influence of the acceleration of gravity. Asshown in FIG. 16B, when the front surface of the controller 7 isinclined upward with respect to the horizontal state before the playerstarts swinging the controller 7, the acceleration of gravity acts inthe negative Y-axis direction and a negative Z-axis direction.Therefore, the Z-axis direction acceleration data shows an accelerationin the negative Z-axis direction by the influence of the acceleration ofgravity. As shown in FIG. 16C, when the front surface of the controller7 is inclined downward with respect to the horizontal state before theplayer starts swinging the controller 7, the acceleration of gravityacts in the negative Y-axis direction and the positive Z-axis direction.Therefore, the Z-axis direction acceleration data shows an accelerationin the positive Z-axis direction by the influence of the acceleration ofgravity. Accordingly, the up-down direction of the controller 7 beforethe player starts swinging the controller 7 can be determined byanalyzing the Z-axis direction acceleration data obtained before theplayer starts swinging the controller 7.

In this embodiment, the obtained Z-axis direction acceleration data isstored in the main memory 33. When it is determined that the controller7 is being swung, an average value Zave of the Z-axis directionacceleration data obtained in 30 immediately previous frames isconverted into an up-down angle UD of the controller 7. Thus, thesubsequent game processing is executed.

For example, as shown in FIG. 17, when the average value Zave isZave≦−0.2G, the average value Zave is converted into an up-down angleUD=60°. When the average value Zave is −0.2G<Zave≦1.0G, the averagevalue Zave is converted into an up-down angle UD linearly changing inthe range of 60° to −60°. When the average value Zave is 1.0G<Zave, theaverage value Zave is converted into an up-down angle UD=−60°. Theup-down angle UD into which the average value Zave is converted iseccentric toward the positive Z-axis direction. The reason is asfollows. Since the Z-axis direction acceleration data is alwayseccentric to the positive Z-axis direction at the start of the swing. Inconsideration of the influence of this, the up-down angle UD is madeeccentric to the positive Z-axis direction. By adjusting such aconversion table, the effect of reflecting the Z-axis directionacceleration data obtained before the player starts swinging thecontroller 7 on the game processing can be adjusted.

Next, the game processing performed by the game system 1 will bedescribed in detail. With reference to FIG. 18, main data used for thegame processing will be described. FIG. 18 shows main data stored in themain memory 33 of the game apparatus 3.

As shown in FIG. 18, the main memory 33 includes stored thereinacceleration data Da, up-down angle data Db, counterclockwiseaccumulated area data Dc, clockwise accumulated area data Dd, first balltrajectorydata De, second ball trajectory data Df, first dummy ball dataDg, second dummy ball data Dh, ball character data Di, start point-endpoint angle data Dj, spin parameter data Dk, maximum inter-plot intervaldata Dl, count data Dm, image data Dn and the like. In addition to datashown in FIG. 18, the main memory 33 also includes stored therein dataon the player character PC, the opponent character EC and the likeappearing in the game (position data, etc.), data on the virtual gamespace (topography data, etc.) and other data necessary for the gameprocessing.

The acceleration data Da is included in a series of operationinformation which is transmitted from the controller 7 as transmissiondata. A predetermined number of frames (for example, 30 frames for oneframe ( 1/60 sec.) as a game processing interval) of the obtainedacceleration data Da is stored. The acceleration data Da includes X-axisdirection acceleration data Da1, Y-axis direction acceleration data Da2,and Z-axis direction acceleration data Da3 detected by the accelerationsensor 701 as components of the X-, Y- and Z-axis directions. Thereceiving unit 6 included in the game apparatus 3 receives theacceleration data Da included in the operation information transmittedfrom the controller 7 at a predetermined time interval (for example,every 5 ms) and accumulates the acceleration data Da in a buffer (notshown) in the receiving unit 6. Then, the acceleration data Da is read aunit of one frame as the game processing interval, and stored in themain memory 33.

The up-down angle data Db represents an up-down angle UD (see FIG. 16Athrough FIG. 16C and FIG. 17) calculated based on the Z-axis directionacceleration data Da3 obtained from the controller 7 before thecontroller 7 is swung. The counterclockwise accumulated area data Dcrepresents the accumulated areas of the triangles (see FIG. 12) formedusing the acceleration data showing a counterclockwise shift withrespect to the origin of the X-Y coordinate system. The clockwiseaccumulated area data Dd represents the accumulated areas of thetriangles (see FIG. 12) formed using the acceleration data showing aclockwise shift with respect to the origin of the X-Y coordinate system.

The first ball trajectory data De represents a trajectory of the ballcharacter BC moving in the virtual game space based on data obtained onan initial stage of motion recognition processing described later (sucha trajectory will be referred to as a “first ball trajectory TR1”). Thesecond ball trajectory data Df represents a trajectory of the ballcharacter BC moving in the virtual game space based on data obtainedthroughout the motion recognition processing described later (such atrajectory will be referred to as a “second ball trajectory TR2”). Thefirst dummy ball data Dg includes first dummy ball velocity data Dg1 andfirst dummy ball position data Dg2. The first dummy ball velocity dataDg1 is velocity vector data which represents the velocity of a firstdummy ball moving along the trajectory represented by the first balltrajectory data De in the virtual game space. The first dummy ballposition data Dg2 is coordinate position data which represents theposition of the first dummy ball moving along the trajectory representedby the first ball trajectory data De in the virtual game space. Thesecond dummy ball data Dh includes first dummy ball velocity data Dh1and second dummy ball position data Dh2. The second dummy ball velocitydata Dh1 is velocity vector data which represents the velocity of asecond dummy ball moving along the trajectory represented by the secondball trajectory data Df in the virtual game space. The second dummy ballposition data Dh2 is coordinate position data which represents theposition of the second dummy ball moving along the trajectoryrepresented by the second ball trajectory data Df in the virtual gamespace. The ball character data Di includes ball character velocity dataDi1 and ball character position data Di2. The ball character velocitydata Di1 is velocity vector data which represents a current velocity ofthe ball character BC in the virtual game space. The ball characterposition data Di2 is coordinate position data which represents a currentposition of the ball character BC in the virtual game space.

The start point-end point angle data Dj represents an angle θ from thestart point Ps to the end point Pe in the X-Y coordinate system (seeFIG. 14A through FIG. 14C). The spin parameter data Dk represents a spinparameter S (see FIG. 15) obtained by converting the angle θ. Themaximum inter-plot interval data Dl represents a maximum data intervalamong the intervals between points plotted in a time series manner inthe X-Y coordinate system based on the X- and Y-axis directionacceleration data obtained throughout the motion recognition processing.The count data Dm represents a counted value used for a flowchartdescribed later.

The image data Dn includes player character image data Dn1, ball imagedata Dn2 and the like, and used for generating a game image by locatingthe player character PC and the ball character BC in the virtual gamespace.

With reference to FIG. 19 through FIG. 26, the game processing performedby the game apparatus 3 will be described in detail. FIG. 19 is aflowchart illustrating a flow of the game processing executed by thegame apparatus 3. FIG. 20 shows a sub-routine of a detailed operation ofinitial motion recognition processing in step 51 shown in FIG. 19. FIG.21 shows a sub-routine of a detailed operation of animation startprocessing in step 52 shown in FIG. 19. FIG. 22 shows a sub-routine of adetailed operation of first behavior processing in step 53 shown in FIG.19. FIG. 23 shows a sub-routine of a detailed operation of secondbehavior processing in step 54 shown in FIG. 19. FIG. 24 shows timing ofmotion recognition processing, animation processing, and ball behaviorprocessing. FIG. 25 shows exemplary behaviors determined in accordancewith the spin parameter S. FIG. 26 shows an example of the first balltrajectory TR1 and the second ball trajectory TR2. With reference to theflowcharts in FIG. 19 through FIG. 23, game processing performed basedon a game operation by the player swinging the controller 7 will bedescribed, and other parts of the game processing not directly relevantto the present invention will be omitted. In FIG. 19 through FIG. 23,each of steps performed by the CPU 30 will be represented with “S”.

When the power of the game apparatus 3 is turned on, the CPU 30 of thegame apparatus 3 executes a start program stored in a boot ROM (notshown) to initialize the elements including the main memory 33. The gameprogram stored on the optical disc 4 is read to the main memory 33, andthus the CPU 30 starts executing the game program. The flowcharts shownin FIG. 19 through FIG. 23 illustrate the game processing executed afterthe above-described processing is completed.

As shown in FIG. 19, the CPU 30 sequentially executes the initial motionrecognition processing (step 51), the animation start processing (step52), the first behavior processing (step 53), and the second behaviorprocessing (step 54). The details of these processing will be describedlater. After step 54, the CPU 30 determines whether or not to terminatethe game (step 55). The game can be terminated, for example, when acondition for terminating the game is fulfilled (e.g., the tennis gameplayed by the player character PC is over) or when the player performsan operation for terminating the game. When it is determined that thegame is not to be terminated, the CPU 30 returns to step 51 and repeatsthe processing. When it is determined that the game is to be terminated,the CPU 30 terminates the processing illustrated in the flowchart inFIG. 19.

With reference to FIG. 20, the initial motion recognition processing instep 51 will be described. The CPU 30 obtains acceleration data includedin the operation information received from the controller 7 (step 61),and advances the processing to the next step. The CPU 30 stores theobtained acceleration data in the main memory 33 as acceleration dataDa. The acceleration data Da obtained in step 61 includes X-, Y-, andZ-axis direction acceleration data Da1, Da2 and Da3 detected by theacceleration sensor 701 as components of three axial directions (X-, Y-and Z-axis directions). The communication section 75 transmits theoperation information to the game apparatus 3 at a predetermined timeinterval (for example, every 5 ms), and thus at least the accelerationdata is accumulated in the buffer (not shown) in the receiving unit 6.The CPU 30 obtains the acceleration data by a unit of one frame, whichis a game processing unit, and stores the acceleration data in the mainmemory 33.

Next, the CPU 30 determines whether or not the controller 7 is beingswung by the player using the obtained acceleration data (step 62).Specifically, when the Z-axis direction acceleration data Da3 obtainedin step 61 represents a positive Z-axis direction value exceeding athreshold value, the CPU 30 determines that the player is swinging thecontroller 7. In this case, the CPU 30 advances the processing to thenext step. When the player is not swinging the controller 7, the CPU 30returns to step 61 and repeats the above-described processing.

In step 63, the CPU 30 determines the up-down direction of thecontroller 7 before the swing, and advances the processing to the nextstep. Specifically, the CPU 30 calculates an average value Zave of theZ-axis direction acceleration data Da3 in several immediately previousframes (for example, 30 frames) stored in the main memory 33. Then, theCPU 30 converts the average Zave into the up-down angle UD (see FIG. 17)and stores data representing the up-down angle UD as the up-down angledata Db.

Next, the CPU 30 obtains the acceleration data included in the operationinformation received from the controller 7 by substantially the sameprocessing as step 61 (step 64), and determines whether or not theplayer has finished the motion of swinging the controller 7 based onwhether or not the obtained Z-axis direction acceleration data Da3represents a value equal to or less than the threshold value (step 65).When the player is still swinging the controller 7, the CPU 30 advancesthe processing to step 66. When the player has finished the motion ofswinging the controller 7, the CPU 30 returns to step 51 and repeats theabove-described processing.

In step 66, the CPU 30 accumulates the areas of the triangles defined bythe accelerated data Da obtained in step 64 and the origin of the X-Ycoordinate system, and advances the processing to the next step.Specifically, as described above with reference to FIG. 12, when theacceleration data Da obtained in step 64 shows a counterclockwise shiftwith respect to the origin, the CPU 30 accumulates the area of theresultant triangle on the counterclockwise accumulated area data Dc asnecessary and stores the obtained data. When the acceleration data Daobtained in step 64 shows a clockwise shift with respect to the origin,the CPU 30 accumulates the area of the resultant triangle on theclockwise accumulated area data Dd as necessary and stores the obtaineddata.

Next, the CPU determines an interval between points plotted in the X-Ycoordinate system (data interval) based on the acceleration data Daobtained in step 64 (step 67), and advances the processing to the nextstep. Specifically, when the obtained data interval is larger than thedata interval included in the current maximum inter-plot interval dataDl, the CPU 30 updates the maximum inter-plot interval data Dl to theobtained data interval. When the obtained data interval is equal to orsmaller than the data interval included in the current maximuminter-plot interval data Dl, the CPU 30 advances the processing to thenext step without updating.

Next, the CPU 30 determines whether or not either one of the accumulatedarea represented by the counterclockwise accumulated area data Dc andthe accumulated area represented by the clockwise accumulated area dataDd has exceeded a threshold value (step 68). When either one of theareas has exceeded the threshold value, the CPU 30 terminates theprocessing of this sub-routine and advances the processing to step 52 inFIG. 19. When neither area has exceeded the threshold value, the CPU 30returns to step 64 and repeats the above-described processing.

With reference to FIG. 21, the animation start processing in step 52will be described. After step 68, the CPU 30 determines the swingingdirection of the controller 7 (step 71), and advances the processing tothe next step. For example, when it is determined in step 68 that theaccumulated area represented by the counterclockwise accumulated areadata Dc has exceeded the threshold value, this means that theacceleration data shows a counterclockwise shift with respect to theorigin of the X-Y coordinate system. Thus, it is determined that theplayer is performing a “rightward swing” (see FIG. 7). When it isdetermined in step 68 that the accumulated area represented by theclockwise accumulated area data Dd has exceeded the threshold value,this means that the acceleration data shows a clockwise shift withrespect to the origin of the X-Y coordinate system. Thus, it isdetermined that the player is performing a “leftward swing” (see FIG.7).

As is clear from steps 68 and 71, the processing in step 71 is executedwhen either one of the counterclockwise accumulated area data Dc and theclockwise accumulated area data Dd has exceeded the threshold value. Theprocessing in step 71 is not executed when the player finishes themotion of swinging the controller 7. As shown in FIG. 24, processing ofrecognizing the motion from the start until the end of the swing of thecontroller 7 by the player (motion recognition processing) is executedfrom time T1 to time T4. Processing of displaying an animation of theplayer character PC swinging the tennis racket (animation processing)starts at time T2, i.e., in the middle of the motion recognitionprocessing. Namely, the swinging direction of the controller 7 isdetermined at a point after the player starts swinging the controller 7but before the player finishes swinging the controller 7, and isreflected on the game image. The initial motion recognition processingin step 51 is executed from time T1 to time T2 as a part of the motionrecognition processing.

The relationship between (i) the swinging direction of the controller 7and (ii) which of the counterclockwise accumulated area and theclockwise accumulated area has exceeded the threshold value varies inaccordance with the setting of the coordinate axes for the controller 7,the characteristics of the acceleration sensor, the setting of the X-Ycoordinate system and the like. Such a relationship may be adjusted inaccordance with such settings as necessary. Specifically, the swingingdirection of the controller 7 can be accurately determined by analyzingthe relationship between (i) the swinging direction of the controller 7and (ii) which of the counterclockwise accumulated area and theclockwise accumulated area has exceeded the threshold value, withrespect to the direction of acceleration of gravity based on theobtained acceleration data.

Next, the CPU 30 determines the swing with which the player character PCwill make in order to hit back the ball character BC (step 72), anddetermines whether or not the player character PC will miss the shot(step 73). In the steps executed so far, the player character PC has notstarted the motion of swinging the racket. However, the CPU 30 canestimate and determine whether or not the player character PC will beable to hit back the ball character BC flying toward the playercharacter PC with a current swing, based on data on a current positionand an estimated future position of the player character PC, a currentposition and an estimated future trajectory of the ball character BC,the swinging direction of the tennis racket by the player character PCand the like. When it is estimated that the player character PC willmiss the shot, the CPU 30 starts processing of displaying an animationof the player character PC missing the shot on the monitor (step 76),and advances the processing to step 55 in FIG. 19. When it is estimatedthat the player character PC will be able to hit back the ball characterBC, the CPU 30 advances the processing to step 74.

In step 74, the CPU 30 counts a time period t from the current timeuntil the player character PC hits back the ball character BC, andstarts counting to update the count data Dn. The CPU 30 startsprocessing of displaying an animation of the player character PC hittingback the ball character BC on the monitor (step 75), and advances theprocessing to the next step. The animation of the player character PChitting back the ball character BC is provided with a swing inaccordance with the up-down angle UD. Namely, an animation of the playercharacter PC swinging up or swinging down the racket in the up-downdirection represented by the up-down angle UD is displayed.

Next, the CPU 30 obtains the acceleration data included in the operationinformation received from the controller 7 (step 77), and determineswhether or not the player has finished the motion of swinging thecontroller 7 based on the acceleration data (step 78). When the playeris still swinging the controller 7, the CPU 30 advances the processingto step 79. When the player has finished the motion of swinging thecontroller 7, the CPU 30 advances the processing to step 101 (see FIG.23). The processing of obtaining the acceleration data in step 77 issubstantially the same as that in step 61 and will not be described indetail. The method for determining whether or not the player hasfinished the motion of swinging the controller 7 in step 78 issubstantially the same as that in step 62 except that the accelerationdata obtained in step 77 is used, and will not be described in detail.

In step 79, the CPU 30 determines an interval between points plotted inthe X-Y coordinate system (data interval) based on the acceleration dataobtained in step 77. The processing of determining the data interval instep 79 is substantially the same as that in step 67 except that theacceleration data obtained in step 77 is used, and will not be describedin detail. Next, the CPU 30 determines whether or not the currentcounted value of the count data Dn has reached the time t (step 80).When the current counted value of the count data Dn has not reached thetime t, the CPU 30 updates the current counted value in the count dataDn (step 81). Then, the CPU 30 returns to step 77 and repeats theabove-described processing. When the current counted value of the countdata Dn has reached the time t, the CPU 30 terminates the processing inthis sub-routine and advances the processing to step 53 in FIG. 19.

With reference to FIG. 22, the first behavior processing in step 53 willbe described. After step 80, the CPU 30 calculates the initial velocity,direction and position at which the ball character BC is hit back,displays the ball character BC at the calculated position (step 91), andadvances the processing to the next step. Specifically, the CPU 30represents the velocity and direction of the ball character BC by avelocity vector (vx, vy, vz) and stores data representing the velocityvector in the ball character velocity data Di1. The magnitude of thevelocity vector (vx, vy, vz) is set to a fixed value. The direction ofthe velocity vector (vx, vy, vz) is set based on the swinging directionof the controller 7 by the player, the relationship between the timingwhen the player starts swinging the controller 7 and the timing when theball character BC arrives at the player, the up-down angle UD and thelike. Specifically, the left-right direction in which the ball characterBC is hit back is determined by the left-right direction in which theplayer character PC swings the tennis racket (i.e., the swingingdirection of the controller 7) and the timing at which the playercharacter PC hits the ball character BC (i.e., the time at which theplayer starts swinging the controller 7). The up-down direction in whichthe ball character BC is hit back is determined by the up-down directionin which the player character PC swings the tennis racket (i.e., theup-down angle UD). For example, when the up-down angle UD has a positivevalue, the player swings down the controller 7. Therefore, the velocityvector of the ball character BC is set to a low value in correspondenceto the value of the up-down angle UD. When the up-down angle UD has anegative value, the player swings up the controller 7. Therefore, thevelocity vector of the ball character BC is set to a high value incorrespondence to the value of the up-down angle UD. The CPU 30indicates the position at which the ball character BC is hit by thetennis racket of the player character PC with a coordinate position (x,y, z) in the virtual game space, and stores the data representing thecoordinate position in the ball character position data Di2.

Next, the CPU 30 obtains the acceleration data included in the operationinformation received from the controller 7 (step 92). The CPU 30determines an interval between points plotted in the X-Y coordinatesystem (data interval) based on the acceleration data Da obtained instep 92 (step 93), and advances the processing to the next step. Theprocessing of obtaining the acceleration data in step 92 issubstantially the same as that in step 61 and will not be described indetail. The processing of determining the data interval in step 93 issubstantially the same as that in step 67 except that the accelerationdata obtained in step 92 is used, and will not be described in detail.

The CPU 30 calculates the first ball trajectory TR1 based on thevelocity vector (vx, vy, vz) and the coordinate position (x, y, z)stored in the current ball character velocity data Di1 and ballcharacter position data Di2. Then, the CPU 30 displays the ballcharacter BC while moving the ball character BC along the first balltrajectory TR1 (step 94). More specifically, the CPU 30 defines thephysical laws of the real world (for example, gravity, air resistance,influence of wind) in the virtual game space virtually or strictly. TheCPU 30 calculates the first ball trajectory TR1 based on the velocityvector (vx, vy, vz), the coordinate position (x, y, z), the spinparameter S (here, S=0.0), and the physical laws, and stores the firstball trajectory TR1 in the first ball trajectory data De. Then, the CPU30 newly calculates the velocity vector (vx, vy, vz) and the coordinateposition (x, y, z) of the ball character BC such that the ball characterBC moves along the first ball trajectory TR1. The CPU 30 stores thenewly calculated velocity vector (vx, vy, vz) and coordinate position(x, y, z) in the ball character velocity data Di1 and the ball characterposition data Di2, and displays the ball character BC at the coordinateposition (x, y, z) on the monitor 2. Then, the CPU 30 advances theprocessing to the next step.

Next, the CPU 30 determines whether or not the player has finished themotion of swinging the controller 7 based on the acceleration dataobtained in step 92 (step 95). When the player is still swinging thecontroller 7, the CPU 30 returns to step 92 and repeats theabove-described processing. When the player has finished the motion ofswinging the controller 7, the CPU 30 advances the processing to step 54in FIG. 19. The method for determining whether or not the player hasfinished the motion of swinging the controller 7 in step 95 issubstantially the same as that in step 62 except that the accelerationdata obtained in step 92 is used, and will not be described in detail.

As is clear from steps 91 through 95, the first behavior processing isexecuted from the time when the ball character BC is hit until the timewhen the player finishes swinging the controller 7. As shown in FIG. 24,processing of representing a behavior of the ball character BC being hitback (ball behavior processing) starts at time T3, i.e., in the middleof the motion recognition processing. Namely, the manner in which theball character BC is hit back is reflected on the game image based onthe operation information (acceleration data) obtained at a point afterthe player starts swinging the controller 7 but before the playerfinishes swinging the controller 7. The animation start processing instep 52 is executed from time T2 to time T3 as a part of the animationprocessing. The first behavior processing in step 53 is executed fromtime T3 to time T4 as a part of the ball behavior processing. The secondbehavior processing described below represents a behavior of the ballcharacter BC being hit after the player finishes swinging the controller7, and starts at time T4 as a part of the behavior processing.

With reference to FIG. 23, the second behavior processing in step 54will be described. After step 95, the CPU 30 calculates the angle θ fromthe start point Ps to the end point Pe (see FIG. 14A through FIG. 14C)and stores the angle θ in the start point-end point angle data Dj (step101). Next, the CPU 30 converts the angle θ into a spin parameter S (seeFIG. 15), and stores the spin parameter S in the spin parameter data Dk(step 102). Based on the data interval stored in the maximum inter-plotinterval data Dl, the CPU 30 calculates the velocity vector (v2x, v2y,v2z) of the second dummy ball, stores the velocity vector in the seconddummy ball velocity data Dh1 (step 103), and advances the processing tothe next step.

As the velocity vector (v2x, v2y, v2z) of the second dummy ball, thevelocity vector of the ball character BC back at the time when theplayer character PC hit the ball character BC with the tennis racket(time T3 shown in FIG. 24) is re-calculated in consideration of theinfluence of the data interval (i.e., the swinging velocity of thecontroller 7). Accordingly, the magnitude of the velocity vector (v2x,v2y, v2z) is set in accordance with the data interval. Specifically,when the data interval is relatively large, the velocity vector is setto be relatively large, whereas when the data interval is relativelysmall, the velocity vector is set to be relatively small. The directionof the velocity vector (v2x, v2y, v2z) is set in substantially the samemanner as step 91.

Next, the CPU 30 performs the processing of adjusting the animation ofthe player character PC hitting back the ball character BC, which isstarted in step 75, displays the animation on the monitor 2 (step 104),and advances the processing to the next step. In step 75 (time T2 shownin FIG. 24), only the left-right and up-down directions and the timingof the player swinging the controller 7 are known. Therefore, theanimation is started based on only such information. In step 104 (timeT4 shown in FIG. 24), the twisting angle given to the controller 7 bythe player and the swinging velocity of the controller 7 are also known.Therefore, an animation also based on such additional information can berepresented. In step 104, a topspin or a backspin found from thetwisting angle and the swinging velocity found from the data intervalare reflected on the animation started in step 75 and displayed on themonitor 2.

Next, the CPU 30 refers to the ball character position data Di2 todetermine whether or not the ball character BC has reached apredetermined space in the virtual game space (step 105). The“predetermined space” refers to, for example, a space above theopponent's court or a space outside the tennis court set in the virtualgame space. When the ball character BC has not reached the predeterminedspace, the CPU 30 advances the processing to step 106. When the ballcharacter BC has reached the predetermined space, the CPU 30 advancesthe processing to step 109.

In step 106, the CPU 30 calculates the first ball trajectory TR1 and thesecond ball trajectory TR2, and performs processing of interpolating thetrajectory of the ball character BC from the first ball trajectory TR1to the second ball trajectory TR2. The CPU 30 moves the ball characterBC along the post-interpolation trajectory to update the ball charactervelocity data Di1 and the ball character position data Di2, and displaysthe ball character BC on the monitor 2 (step 107). Then, the CPU 30advances the processing to step 108.

With reference to FIG. 25 and FIG. 26, the second ball trajectory TR2and the interpolation processing will be described. The first balltrajectory TR1 of the ball character BC calculated in step 94 isobtained only based on the information recognized in the initial motionrecognition processing (the left-right and up-down directions and thetiming at which the controller 7 is swung). The second ball trajectoryTR2 of the ball character BC is calculated further based on informationobtained throughout the motion recognition processing (the twistingangle and the swinging velocity of the controller 7).

The second ball trajectory TR2 is calculated as follows, like the firstball trajectory TR1. The CPU 30 defines the physical laws of the realworld in the virtual game space. The CPU 30 calculates the second balltrajectory TR2 based on the velocity vector (v2x, v2y, v2z), thecoordinate position (x2, y2, z2), the spin parameter S, and the physicallaws, and stores the second ball trajectory TR2 in the second balltrajectory data Df. More specifically, the CPU 30 calculates the secondball trajectory TR2 by adding the influence of the spin parameter S to atrajectory calculated in substantially the same manner as the first balltrajectory TR1 using the coordinate position (x2, y2, z2) at which theball character BC is hit by the tennis racket of the player character PCand the velocity vector (v2x, v2y, v2z) obtained in step 103.

As shown in FIG. 25, when the player performs a “leftward swing” of thecontroller 7 with a “leftward twist” or performs a “right ward swing” ofthe controller 7 with a “rightward twist”, the spin parameter S isS>0.0, which represents a topspin. When the player performs a “leftwardswing” of the controller 7 with a “rightward twist” or performs a “rightward swing” of the controller 7 with a “leftward twist”, the spinparameter S is S<0.0, which represents a backspin. When the spinparameter S represents a topspin (S>0.0), the CPU 30 changes thetrajectory so as to rapidly go down in the up-down direction. When thespin parameter S represents a backspin (S<0.0), the CPU 30 changes thetrajectory such that the flying distance of the ball character BCincreases in the up-down direction and the ball character BC curves inthe left-right direction in accordance with the swinging direction (suchthat the ball character BC curves rightward in the case of a “leftwardswing” and curves leftward in the case of a “rightward swing”). When thespin parameter S represents no twist (S=0.0), the CPU 30 does not changethe trajectory as an influence of the spin.

As shown in FIG. 24 and FIG. 26, the second ball trajectory TR2 iscalculated at time T4 when the player finishes swinging the controller7. At this point, the ball character BC displayed on the monitor 2 isalready moving along the first ball trajectory TR1 (thick line in FIG.26 between time T3 and time T4). The trajectory reflecting all the dataobtained by the player swinging the controller 7 is the second balltrajectory TR2. Therefore, it is desirable to modify the trajectory ofthe ball character BC from the first ball trajectory TR1 to the secondball trajectory TR2 such that the ball character BC moves along thesecond ball trajectory TR2. In order to move the ball character BC alongthe second ball trajectory TR2 without making the player feel unnatural,it is necessary to make a shift from the first ball trajectory TR1 tothe second ball trajectory TR2 smoothly (thick line in FIG. 26 betweentime T4 and time T5). In this embodiment, in the process of shifting thefirst ball trajectory TR1 to the second ball trajectory TR2 (thick linein FIG. 26 between time T4 and time T5), a dummy ball which is notdisplayed is flown along each of the first ball trajectory TR1 and thesecond ball trajectory TR2. A position at which the positions of thedummy balls are interpolated is set as the position of the ballcharacter BC.

The CPU 30 sets a dummy ball flown along the first ball trajectory TR1as a first dummy ball B1. A first dummy ball velocity (v1x, v1y, v1z)and a first dummy ball position (x1, y1, z1) are provided as theparameters of the first dummy ball B1. The CPU 30 sets a dummy ballflown along the second ball trajectory TR2 as a second dummy ball B2. Asecond dummy ball velocity (v2x, v2y, v2z) and a second dummy ballposition (x2, y2, z2) are provided as the parameters of the second dummyball B2. An interpolation time period Ti is set as a time periodrequired for the interpolation (time T5 to time T6 shown in FIG. 26).

At time T4, the CPU 30 stores the ball character velocity (vx, vy, vz)and the ball character position (x, y, z), stored in the ball characterdata Di, in the first dummy ball data Dg as the first dummy ballvelocity (v1x, v1y, v1z) and the first dummy ball position (x1, y1, z1).Based on the second dummy ball data Dh, the CPU 30 moves the seconddummy ball B2 along the second dummy ball trajectory TR2 to a positioncorresponding to the time T4 and updates the second dummy ball data Dh.

At time Tn between time T4 and time T5, the CPU 30 updates theparameters of the first dummy ball B1 and the second dummy ball B2 byphysical calculations, and moves the first dummy ball B1 and the seconddummy ball B2 frame by frame along the first dummy ball trajectory TR1and the second dummy ball trajectory TR2 respectively. The CPU 30 usesthe following equations to calculate the position and velocity at whichthe dummy balls are to be interpolated and thus update the ballcharacter velocity data Di1 and the ball character position data Di2(thick line between time T4 and time T5 shown in FIG. 26).ratio=(Tn−T 4)÷Tix=x 2×ratio+x 1×(1.0−ratio)y=y 2×ratio+y 1×(1.0−ratio)z=z 2×ratio+z1×(1.0−ratio)vx=v 2 x×ratio+v 1 x×(1.0−ratio)vy=v 2 y×ratio+v 1 y×(1.0−ratio)vz=v 2 z×ratio+v 1 z×(1.0−ratio)

As shown here, the ball character velocity data Di1 and the ballcharacter position data Di2 between time T4 and time T5 are obtained byweighting the velocity and position of the first dummy ball B1 and thesecond dummy ball B2, obtained at a predetermined time interval, at apredetermined ratio and averaging the resultant velocity and position.

After time T5 (thick line after time T5 shown in FIG. 26), the CPU 30abandons the first dummy ball B1 and the second dummy ball B2. The CPU30 calculates the second ball trajectory TR2 based on the velocityvector (vx, vy, vz) and the coordinate position (x, y, z) stored in thecurrent ball character velocity data Di1 and ball character positiondata Di2. The CUP 30 moves the ball character BC along the second balltrajectory TR2 to update the ball character velocity data Di1 and theball character position data Di2, and displays the ball character BC onthe monitor 2.

Returning to FIG. 23, in step 108, the CPU 30 determines whether or notthe ball character BC either has been hit back toward the opponentcharacter EC or has become out (directly gone out of the court). Whenthe ball character BC has not been hit back toward the opponentcharacter EC or has not become out, the CPU 30 returns to step 106 andrepeats the above-described processing. When the ball character BCeither has been hit back toward the opponent character EC or has becomeout, the CPU 30 terminates the processing of this sub-routine andadvances the processing to step 55 in FIG. 19.

When, in step 105, the ball character BC has reached the predeterminedspace, the CPU 30 displays the ball character BC while moving the ballcharacter BC along the first ball trajectory TR1 (step 109), andadvances the processing to the next step. More specifically, the CPU 30calculates the first ball trajectory TR1 based on the velocity vector(vx, vy, vz) and the coordinate position (x, y, z) stored in the currentball character velocity data Di1 and ball character position data Di2.The CPU 30 displays the ball character BC while moving the ballcharacter BC along the first ball trajectory TR1. The processing in step109 is substantially the same as step 94, and will not be described indetail.

Next, the CPU 30 determines whether or not the ball character BC eitherhas been hit back toward the opponent character EC or has become out(directly gone out of the court) (step 110). When the ball character BChas not been hit back toward the opponent character EC or has not becomeout, the CPU 30 returns to step 109 and repeats the above-describedprocessing. When the ball character BC either has been hit back towardthe opponent character EC or has become out, the CPU 30 terminates theprocessing of this sub-routine and advances the processing to step 55 inFIG. 19.

As described above, the game apparatus 3 in this embodiment canaccurately determine motions of the controller 7 including the swingingdirection of the controller 7 (moving direction of the controller 7) andthe twisting direction of the controller 7 (rotation direction of thecontroller 7 around the Z axis as the rotation axis) as long as theplayer holds the controller 7 with one hand such that the front surfaceof the controller 7 is directed forward (i.e., away from the player).The player may swing the controller 7 with the top surface in anydirection. Therefore, the degree of freedom in terms of the direction ofthe controller 7 held by the player (posture of the controller 7) issignificantly increased. Since a rotation motion given to the controller7 can be determined, a composite motion including a plurality of motionscan be determined, for example, a motion of the controller 7 being swungwhile being rotated by the player. Since such a rotation motion given tothe controller 7 can be used as operation information, the variety oftypes of operations which can be input is widened.

In the above-described game processing, the first ball trajectory TR1and the second ball trajectory TR2 are calculated frame by frame (i.e.,calculated with the processing loop of each of steps 94, 106 and 109).The trajectories may be calculated in other manners. For example, thefirst ball trajectory TR1 and the second ball trajectory TR2 oncecalculated may be stored in a memory and the stored data may be used asnecessary. In this case, the first ball trajectory TR1 and/or the secondball trajectory TR2 may be calculated before the processing loop (forexample, after step 91, after step 103). In this case, it is notnecessary to calculate the trajectories frame by frame.

In the above description, the acceleration data in three axialdirections output from the controller 7 is used to play a tennis game.The acceleration data may be used for other types of game processing.For example, the present invention is applicable to a game in which theplayer character swings some type of object (ping pong, badminton,baseball, cutting something with a sword, etc.). In the abovedescription, a determining apparatus for determining a motion of thecontroller 7 is included in the game system 1. The present invention isapplicable to an information processing apparatus such as a generalpersonal computer operated by an input device including an accelerationsensor. Based on a determined result of a motion determining apparatus,various processing can be executed. For example, in accordance with thedetermined motion of the input device, data displayed by the informationprocessing apparatus may be moved, the page of information displayed bythe information processing apparatus may be changed, or graphics aredrawn. The motion determining apparatus may create motion datarepresenting a motion of the input device in accordance with thedetermined motion of the input device and output the motion data toanother apparatus.

The acceleration sensor 701 of the controller 7 is preferably a triaxialacceleration sensor for detecting and outputting linear accelerations ascomponents of three axial directions perpendicular to one another.However, an acceleration sensor for detecting an acceleration in atleast two axial directions perpendicular to each other can also be used.For example, the above-described left-right swinging direction ortwisting direction can be determined using an acceleration sensor fordetecting and outputting the acceleration in a three-dimensional spacein which the controller 7 is located, as components of two axialdirections, i.e., X-axis and Y-axis directions (see FIG. 3 and FIG. 4).In this case, the start and the end of the swing cannot be determinedusing the Z-axis direction acceleration, unlike the above embodiment.However, the start and the end of the swing may be determined using acentrifugal component which is generated by a left-right swing obtainedby the X-axis and Y-axis direction accelerations, or using a sensordifferent from the acceleration sensor 701. Alternatively, a game rulethat one of the operations buttons 72 should be pressed when the playerswings the controller 7 may be provided, so that the start and the endof the swing can be determined in accordance with the time period inwhich such a button is being pressed.

In the above description, the controller 7 and the game apparatus 3 areconnected to each other by wireless communication. Alternatively, thecontroller 7 and the game apparatus 3 may be electrically connected toeach other via a cable. In this case, the cable connected to thecontroller 7 is connected to a connection terminal of the game apparatus3.

In the above description, the receiving unit 6 connected to theconnection terminal of the game apparatus 3 is used as receiving meansfor receiving transmission data which is wirelessly transmitted from thecontroller 7. Alternatively, the receiving means may be a receivingmodule built in the game apparatus 3. In this case, the transmissiondata received by the receiving module is output to the CPU 30 via apredetermined bus.

The shape of the controller 7, and the shape, number, position or thelike of the operation section 72 provided in the controller 7 are merelyexemplary, and may be altered without departing from the scope of thepresent invention. The position of the imaging information calculationsection 74 in the controller 7 (the light incident opening of theimaging information calculation section 74) does not need to be on thefront surface of the housing 71, and may be on another surface as longas light can enter from the outside of the housing 71.

A motion determining apparatus and a storage medium having a motiondetermining program stored thereon according to the present inventionare capable of determining a rotation motion given to an input device,and are useful as an apparatus or a program for determining a motion ofan input device, such as a game apparatus or a game program operable inaccordance with the motion of a game controller.

While the invention has been described in detail, the foregoingdescription is in all aspects illustrative and not restrictive. It isunderstood that numerous other modifications and variations can bedevised without departing from the scope of the invention.

1. A motion determining apparatus for determining a motion of an inputdevice including an acceleration sensor (701) for detecting anacceleration in each of at least two axial directions, the motiondetermining apparatus comprising: data obtaining means for obtainingacceleration data which is output from the acceleration sensor; rotationmotion determination means for determining a rotation motion of theinput device around a predetermined direction as a rotation axis, bycomparing a start point in a two-dimensional coordinate system which isrepresented by the first acceleration data obtained in a predeterminedperiod, and an end point in the two-dimensional coordinate system whichis represented by the last acceleration data obtained in thepredetermined period, wherein coordinate axes of the two-dimensionalcoordinate system are defined based on components of the two axialdirections of the acceleration data, and an origin of thetwo-dimensional coordinate system represents a value of the accelerationdata in the state where no acceleration including the acceleration ofgravity acts upon the acceleration sensor; and output means foroutputting motion data including at least the rotation motion determinedby the rotation motion determination means.
 2. A motion determiningapparatus according to claim 1, further comprising storage means forstoring the acceleration data sequentially obtained by the dataobtaining means; wherein the rotation motion determination means sets acoordinate point in the two-dimensional coordinate system which isrepresented by the first acceleration data obtained in the predeterminedperiod, among the acceleration data stored in the storage means, as thestart point; and sets a coordinate point in the two-dimensionalcoordinate system which is represented by the last acceleration dataobtained in the predetermined period, among the acceleration data storedin the storage means, as the end point.
 3. A motion determiningapparatus according to claim 2, wherein: the acceleration sensor detectsan acceleration of the input device in each of three axial directionsperpendicular to one another; the rotation motion determination meanssets a time period in which acceleration data in a first axial directionof the three axial directions exceeds a predetermined value as thepredetermined period; the two-dimensional coordinate system has thecoordinate axes defined based on components of a second axial directionand a third axial direction of the three axial directions; and therotation motion determination means determines the rotation motion usingacceleration data in the second axial direction and the third axialdirection which has been obtained first and last in the predeterminedperiod and stored in the storage means.
 4. A motion determiningapparatus according to claim 1, wherein: the rotation motiondetermination means includes angle calculation means for calculating anangle defined by a vector from the origin toward the start point in thetwo-dimensional coordinate system and a vector from the origin towardthe end point in the two-dimensional coordinate system; and the rotationmotion determination means determines the rotation motion based on theangle.
 5. A motion determining apparatus according to claim 4, furthercomprising storage means for storing the acceleration data sequentiallyobtained by the data obtaining means; wherein the rotation motiondetermination means sets a coordinate point in the two-dimensionalcoordinate system which is represented by the first acceleration dataobtained in the predetermined period, among the acceleration data storedin the storage means, as the start point; and sets a coordinate point inthe two-dimensional coordinate system which is represented by the lastacceleration data obtained in the predetermined period, among theacceleration data stored in the storage means, as the end point.
 6. Amotion determining apparatus according to claim 5, wherein: theacceleration sensor detects an acceleration of the input device in eachof three axial directions perpendicular to one another; the rotationmotion determination means sets a time period in which acceleration datain a first axial direction of the three axial directions exceeds apredetermined value as the predetermined period; the two-dimensionalcoordinate system has the coordinate axes defined based on components ofa second axial direction and a third axial direction of the three axialdirections; and the rotation motion determination means determines therotation motion using acceleration data in the second axial directionand the third axial direction which has been obtained first and last inthe predetermined period and stored in the storage means.
 7. A motiondetermining apparatus according to claim 4, wherein: the rotation motiondetermination means further includes rotation direction determinationmeans for, when the angle exceeds a first threshold value, determiningthat the input device has been moved while being rotated in one of twodirections, and when the angle is less than a second threshold value,determining that the input device has been moved while being rotated inthe other of the two directions with respect to the rotation axis; andthe output means outputs the motion data including the rotationdirection determined by the rotation direction determination means.
 8. Amotion determining apparatus according to claim 7, further comprisingstorage means for storing the acceleration data sequentially obtained bythe data obtaining means; wherein the rotation motion determinationmeans sets a coordinate point in the two-dimensional coordinate systemwhich is represented by the first acceleration data obtained in thepredetermined period, among the acceleration data stored in the storagemeans, as the start point; and sets a coordinate point in thetwo-dimensional coordinate system which is represented by the lastacceleration data obtained in the predetermined period, among theacceleration data stored in the storage means, as the end point.
 9. Amotion determining apparatus according to claim 8, wherein: theacceleration sensor detects an acceleration of the input device in eachof three axial directions perpendicular to one another; the rotationmotion determination means sets a time period in which acceleration datain a first axial direction of the three axial directions exceeds apredetermined value as the predetermined period; the two-dimensionalcoordinate system has the coordinate axes defined based on components ofa second axial direction and a third axial direction of the three axialdirections; and the rotation motion determination means determines therotation motion using acceleration data in the second axial directionand the third axial direction which has been obtained first and last inthe predetermined period and stored in the storage means.
 10. A motiondetermining apparatus according to claim 4, wherein: the rotation motiondetermination means further includes rotation angle determination meansfor determining a rotation angle of the input device based on a value ofthe angle; and the output means outputs the motion data including therotation angle determined by the rotation angle determination means. 11.A motion determining apparatus according to claim 10, further comprisingstorage means for storing the acceleration data sequentially obtained bythe data obtaining means; wherein the rotation motion determinationmeans sets a coordinate point in the two-dimensional coordinate systemwhich is represented by the first acceleration data obtained in thepredetermined period, among the acceleration data stored in the storagemeans, as the start point; and sets a coordinate point in thetwo-dimensional coordinate system which is represented by the lastacceleration data obtained in the predetermined period, among theacceleration data stored in the storage means, as the end point.
 12. Amotion determining apparatus according to claim 11, wherein: theacceleration sensor detects an acceleration of the input device in eachof three axial directions perpendicular to one another; the rotationmotion determination means sets a time period in which acceleration datain a first axial direction of the three axial directions exceeds apredetermined value as the predetermined period; the two-dimensionalcoordinate system has the coordinate axes defined based on components ofa second axial direction and a third axial direction of the three axialdirections; and the rotation motion determination means determines therotation motion using acceleration data in the second axial directionand the third axial direction which has been obtained first and last inthe predetermined period and stored in the storage means.
 13. A motiondetermining apparatus according to claim 1, wherein: the accelerationsensor detects an acceleration including at least a centrifugalcomponent generated when the input device is swung by a user so as tooutput acceleration data; and the rotation motion determination meanssets, as the start point, a coordinate point in the two-dimensionalcoordinate system which is represented by acceleration data obtained atthe start of a period in which an acceleration of the centrifugalcomponent exceeds a threshold value, among the acceleration dataobtained by the data obtaining means; and sets, as the end point, acoordinate point in the two-dimensional coordinate system which isrepresented by acceleration data obtained at the end of the period,among the acceleration data obtained by the data obtaining means.
 14. Astorage medium having stored thereon a motion determining programexecutable by a computer of a motion determining apparatus fordetermining a motion of an input device including an acceleration sensorfor detecting an acceleration in each of at least two axial directions,the motion determining program causing the computer to execute: a dataobtaining step of obtaining acceleration data which is output from theacceleration sensor; a rotation motion determination step of determininga rotation motion of the input device around a predetermined directionas a rotation axis, by comparing a start point in a two-dimensionalcoordinate system which is represented by the first acceleration dataobtained in a predetermined period, and an end point in thetwo-dimensional coordinate system which is represented by the lastacceleration data obtained in the predetermined period, whereincoordinate axes of the two-dimensional coordinate system are definedbased on components of the two axial directions of the accelerationdata, and an origin of the two-dimensional coordinate system representsa value of the acceleration data in the state where no accelerationincluding the acceleration of gravity acts upon the acceleration sensor;and an output step of outputting motion data including at least therotation motion determined in the rotation motion determination step.15. A storage medium having stored thereon the motion determiningprogram according to claim 14, wherein the motion determining programfurther causes the computer to execute a storage control step of storingthe acceleration data, sequentially obtained in the data obtaining step,in a memory; wherein in the rotation motion determination step, acoordinate point in the two-dimensional coordinate system which isrepresented by the first acceleration data obtained in the predeterminedperiod, among the acceleration data stored in the memory, is set as thestart point; and a coordinate point in the two-dimensional coordinatesystem which is represented by the last acceleration data obtained inthe predetermined period, among the acceleration data stored in thememory, is set as the end point.
 16. A storage medium having storedthereon the motion determining program according to claim 15, wherein:the acceleration sensor determines an acceleration of the input devicein each of three axial directions perpendicular to one another; in therotation motion determination step, a time period in which accelerationdata in a first axial direction of the three axial directions exceeds apredetermined value is set as the predetermined period; thetwo-dimensional coordinate system has the coordinate axes defined basedon components of a second axial direction and a third axial direction ofthe three axial directions; and in the rotation motion determinationstep, the rotation motion is determined using acceleration data in thesecond axial direction and the third axial direction which has beenobtained first and last in the predetermined period and stored in thememory.
 17. A storage medium having stored thereon the motiondetermining program according to claim 14, wherein: the rotation motiondetermination step includes an angle calculation step of calculating anangle defined by a vector from the origin toward the start point in thetwo-dimensional coordinate system and a vector from the origin towardthe end point in the two-dimensional coordinate system; and in therotation motion determination step, the rotation motion is determinedbased on the angle.
 18. A storage medium having stored thereon themotion determining program according to claim 17, wherein the motiondetermining program further causes the computer to execute a storagecontrol step of storing the acceleration data, sequentially obtained inthe data obtaining step, in a memory; wherein in the rotation motiondetermination step, a coordinate point in the two-dimensional coordinatesystem which is represented by the first acceleration data obtained inthe predetermined period, among the acceleration data stored in thememory, is set as the start point; and a coordinate point in thetwo-dimensional coordinate system which is represented by the lastacceleration data obtained in the predetermined period, among theacceleration data stored in the memory, is set as the end point.
 19. Astorage medium having stored thereon the motion determining programaccording to claim 18, wherein: the acceleration sensor determines anacceleration of the input device in each of three axial directionsperpendicular to one another; in the rotation motion determination step,a time period in which acceleration data in a first axial direction ofthe three axial directions exceeds a predetermined value is set as thepredetermined period; the two-dimensional coordinate system has thecoordinate axes defined based on components of a second axial directionand a third axial direction of the three axial directions; and in therotation motion determination step, the rotation motion is determinedusing acceleration data in the second axial direction and the thirdaxial direction which has been obtained first and last in thepredetermined period and stored in the memory.
 20. A storage mediumhaving stored thereon the motion determining program according to claim17, wherein: the rotation motion determination step further includes arotation direction determination step of, when the angle exceeds a firstthreshold value, determining that the input device has been moved whilebeing rotated in one of two directions, and when the angle is less thana second threshold value, determining that the input device has beenmoved while being rotated in the other of the two directions withrespect to the rotation axis; and in the output step, the motion dataincluding the rotation direction determined in the rotation directiondetermination step is output.
 21. A storage medium having stored thereonthe motion determining program according to claim 20, wherein the motiondetermining program further causes the computer to execute a storagecontrol step of storing the acceleration data, sequentially obtained inthe data obtaining step, in a memory; wherein in the rotation motiondetermination step, a coordinate point in the two-dimensional coordinatesystem which is represented by the first acceleration data obtained inthe predetermined period, among the acceleration data stored in thememory, is set as the start point; and a coordinate point in thetwo-dimensional coordinate system which is represented by the lastacceleration data obtained in the predetermined period, among theacceleration data stored in the memory, is set as the end point.
 22. Astorage medium having stored thereon the motion determining programaccording to claim 21, wherein: the acceleration sensor determines anacceleration of the input device in each of three axial directionsperpendicular to one another; in the rotation motion determination step,a time period in which acceleration data in a first axial direction ofthe three axial directions exceeds a predetermined value is set as thepredetermined period; the two-dimensional coordinate system has thecoordinate axes defined based on components of a second axial directionand a third axial direction of the three axial directions; and in therotation motion determination step, the rotation motion is determinedusing acceleration data in the second axial direction and the thirdaxial direction which has been obtained first and last in thepredetermined period and stored in the memory.
 23. A storage mediumhaving stored thereon the motion determining program according to claim17, wherein: the rotation motion determination step further includes arotation angle determination step of determining a rotation angle of theinput device based on a value of the angle; and in the output step, themotion data including the rotation angle determined in the rotationangle determination step is output.
 24. A storage medium having storedthereon the motion determining program according to claim 23, whereinthe motion determining program further causes the computer to execute astorage control step of storing the acceleration data, sequentiallyobtained in the data obtaining step, in a memory; wherein in therotation motion determination step, a coordinate point in thetwo-dimensional coordinate system which is represented by the firstacceleration data obtained in the predetermined period, among theacceleration data stored in the memory, is set as the start point; and acoordinate point in the two-dimensional coordinate system which isrepresented by the last acceleration data obtained in the predeterminedperiod, among the acceleration data stored in the memory, is set as theend point.
 25. A storage medium having stored thereon the motiondetermining program according to claim 24, wherein: the accelerationsensor determines an acceleration of the input device in each of threeaxial directions perpendicular to one another; in the rotation motiondetermination step, a time period in which acceleration data in a firstaxial direction of the three axial directions exceeds a predeterminedvalue is set as the predetermined period; the two-dimensional coordinatesystem has the coordinate axes defined based on components of a secondaxial direction and a third axial direction of the three axialdirections; and in the rotation motion determination step, the rotationmotion is determined using acceleration data in the second axialdirection and the third axial direction which has been obtained firstand last in the predetermined period and stored in the memory.
 26. Astorage medium having stored thereon the motion determining programaccording to claim 14, wherein: the acceleration sensor detects anacceleration including at least a centrifugal component generated whenthe input device is swung by a user so as to output acceleration data;and in the rotation motion determination step, a coordinate point in thetwo-dimensional coordinate system which is represented by accelerationdata obtained at the start of a period in which an acceleration of thecentrifugal component exceeds a threshold value, among the accelerationdata obtained in the data obtaining step, is set as the start point; anda coordinate point in the two-dimensional coordinate system which isrepresented by acceleration data obtained at the end of the period,among the acceleration data obtained in the data obtaining step, is setas the end point.